18.03.2013, 20:53
well thats because you just exploded the vehicle, the vehicle takes about 3-4 seconds to fully explode from the server. what you have to do now is also use SetPlayerHealth, so that he dies immediately.
pawn Код:
CMD:suicide(playerid, params[])
{
if(gTeam[playerid] != T_IRAQ) return SendClientMessage(playerid, 0xFF0000FF, "You must be a Taliban to use this command.");
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid,0);
SetPlayerHealth(playerid, 0);
new Float:x, Float:y, Float:z;
GetVehiclePos(vehicleid, x, y, z);
CreateExplosion(x, y, z, 7, 7.0);
return 1;
}