[pawn]new Robbed[MAX_VEHICLES];[/pawn]
now cmd
[pawn] else if ( strcmp( cmd, "rob", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(Robbed[vehicleid] == 1) SendClientMessage(playerid,RED," You Cant Steal It Again ");
else if(!IsPlayerInAnyVehicle(playerid)) MessagePM(playerid, GREEN,"[Error] - Need to be inside a vehicle");
else
{
IncPlayerCash(playerid,1000);
Robbed[vehicleid] = 1;
SendClientMessageToAll(RED," A Vehicle Has Been Robbed By RObbers");
SetVehicleHealth(vehicleid, 500);
SetVehicleTyre(vehicleid,0);
SetVehicleAlarm(vehicleid,1);
SetVehicleLights(vehicleid,1);
}
return 1;
}[/pawn]
now you can rob car cash and hp