PDA

View Full Version : Help me Car wont despawn with command


AMEENAMEEN
08/05/2012, 10:39 AM
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;

whats wrong in this

HDFord
08/05/2012, 10:48 AM
Are you sure "car" is the right vehicleid?

Issam
21/05/2012, 07:23 PM
Fixed and sent in PM.