08.04.2009, 12:00
hello 
i was checking a little command for lock cars but when i use the command works but i recive Unknown Command but i have add the "return something" at the end of the command
can some one check if i have made some mistakes?

i was checking a little command for lock cars but when i use the command works but i recive Unknown Command but i have add the "return something" at the end of the command
pawn Код:
if(strcmp(cmd, "/lock", true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
if(GetCreatorID(vehicleid) != 0)
{
if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
{
for(new ip = 0; ip < MAX_PLAYERS; ip++)
{
if(ip != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), ip, 0, 1);
}
SendClientMessage(playerid, COLOR_GRAD4, "* Veicolo Chiuso");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
CarInfo[vehicleid][cLock] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Aiuto: Non puoi chiudere un veicolo che non и di tua proprietа!");
return 1;
}
}
else
{
for(new ip = 0; ip < MAX_PLAYERS; ip++)
{
if(ip != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), ip, 0, 1);
}
SendClientMessage(playerid, COLOR_GRAD4, "* Veicolo Chiuso");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
CarInfo[vehicleid][cLock] = 1;
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Aiuto: Puoi chiudere un veicolo solo al posto di guida!");
}
return 1;
}
