Resurse CS,Jocuri Online Si Multe Altele


Share | 
 

 [SA:MP] Probleme /oldcar ? Acum rezolvate

View previous topic View next topic Go down 
AuthorMessage
xPlode
Admin Forum
Admin Forum


Posts : 265
Join date : 26/08/2011
Age : 19

PostSubject: [SA:MP] Probleme /oldcar ? Acum rezolvate   Sun Sep 04, 2011 6:04 am

Multi imi ziceti ca aveti probleme la /oldcar ca nu va apare bine etc.. Acuma se rezolva.

Definim global:
Code:
new MyOldCar[MAX_PLAYERS]
La:
Code:
public OnPlayerConnect(playerid)

Definim mai jos de preferinta dupa SpawnChange[playerid] = 1;
Code:
MyOldCar[playerid] = 0

Mergem la:
Code:
public OnPlayerStateChange(playerid, newstate, oldstate)

si definim dupa { :
Code:
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT) MyOldCar[playerid] = GetPlayerVehicleID(playerid)

Acum sa facem comanda la:
Code:
public OnPlayerComandText

si dupa cateva comenzi adaugam:
Code:
if(!strcmp(cmdtext,"/myoldcar",true))
    {
          format(string,sizeof(string),"OldCarID = %d",MyOldCar[playerid]);
        SendClientMessage(playerid,COLOR_WHITE,string)
    }

Tutorial facut 100% de catre mine, asa nu veti mai avea probleme la /oldcar folosind comanda /myoldcar
Back to top Go down
View user profile http://csresurse.4rumer.ro
 
[SA:MP] Probleme /oldcar ? Acum rezolvate
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Resurse CS,Jocuri Online Si Multe Altele :: Alte Jocuri :: San Andreas / SAMP :: TUTORIALE San Andreas / SAMP-
Jump to: