08.05.2012, 10:39
pawn Код:
if(strcmp(cmd,"/despawncopcar",true)==0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMember] != 6)
{
//SendClientMessage(playerid, COLOR_GREY, " You are not a Police Officer.");
//return 1;
}
for(new car = 0; car < MAX_VEHICLES; car++)
{
if(CopInfo[car][Created] == 0)
{
if(strcmp(CopInfo[car][Owner], sendername, true) == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Police Vehicle Despawned !");
SetVehicleToRespawn(car);
return 1;
}
}
else
{
return SendClientMessage(playerid, COLOR_GREY, " An error has occured.");
}
}
return 1;
}
return 1;