03.11.2013, 13:04
Okay I tried with stock I posted above and it's not working :/
here is the testing code
my compiler crashed when I tried to compile this code.
here is the testing code
pawn Код:
if(strcmp(cmd, "/siren", true) == 0)
{
new vehicleid = GetVehicleModel(vehicleid);
if(IsPlayerConnected(playerid))
{
if(GetPlayerVehicleID(vehicleid) != IsUnderCoverCar(vehicleid))
{
//
}
new x_nr[256]; // number
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) // if number is not entered player will get error message
{
SendClientMessage(playerid,0xFF0000AA,"Choose type for siren: 1 - Dashboard, 2 - Roof!"); // error message
return 1;
}
else if(strcmp(x_nr,"1",true) == 0) // if they will enter /siren 1 object will be placed inside of car
{
//
}
else if(strcmp(x_nr,"2",true) == 0) // if they will enter /siren 2 object will be on roof
{
//
}
}
}
return 1;
}