25.06.2010, 03:31
pawn Код:
if(strcmp(cmdtext, "/dive", true) == 0)
{
new Float:Pos[3];
if(!IsPlayerInAnyVehicle(playerid)) {
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+300);
GameTextForPlayer(playerid, "I hope the parachute work", 5000, 5);
GivePlayerWeapon(playerid, 48, 1);
}
else {
GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
SetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]+300);
GameTextForPlayer(playerid, "I hope the airbag works", 5000, 5);
}
return 1;
}