23.06.2012, 22:21
Firstly, you would need to make static name so here is an example:
pawn Код:
CMD:car(playerid,params[])
{
if(DMZone[playerid] == 0)
{
new Float:x,Float:y,Float:z,Float:q,string[70];
static buffalo[12],input[12];
format(buffalo,sizeof(buffalo),"buffalo");
if(sscanf(params,"s",input)) return SendClientMessage(playerid,-1,"Usage: /car [name]");
GetPlayerPos(playerid,x,y,z);
if(strcmp(buffalo,input,true) == 0)
{
CreateVehicle(402, x,y,z,q, 0, 0, 30);
format(string,sizeof(string),"Car id = 402 - Color = 0 - color2 = 0");
SendClientMessage(playerid,-1,string);
}
}
return 1;
}