18.01.2016, 04:29
Tenta
PHP код:
if(strcmp(cmd, "/v", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, -1, "Vocк nгo pode estб em um veiculo");
return 1;
}
new IDCar, C1, C2;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "Veнculo Invбlido.");
return 1;
}
IDCar = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "Use: /Cv [ID] [Cor 1] [Cor 2]");
return 1;
}
C1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "Use: /Cv [ID] [Cor 1] [Cor 2]");
return 1;
}
C2 = strval(tmp);
if(IDCar >= 400 && IDCar <= 611)
{
new
v,
Float:P[4];
GetPlayerPos(playerid, P[0], P[1], P[2]);
GetPlayerFacingAngle(playerid, P[3]);
v = CreateVehicle(IDCar, P[0], P[1], P[2]+1, P[3], C1, C2, 0);
PutPlayerInVehicle(playerid, v, 0);
SendClientMessage(playerid, Verde, "- > Veнculo criado.");
}
return 1;
}