28.04.2011, 07:39
Heey guys
I made a kidnap command.
Code:
But how can i make a release command?
Thanks Admigo
I made a kidnap command.
Code:
Код:
dcmd_kidnap(playerid, params[]) { new id; if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/kidnap <playerid>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "[Server] Player not found"); else { new vehicleid; vehicleid = GetPlayerVehicleID(playerid); if(GetPlayerSkin(playerid) == 116) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) { PutPlayerInVehicle(id,vehicleid,1); TogglePlayerControllable(id,0); SendClientMessage(id, COLOR_RED, "[Server] You have been kidnapped"); SendClientMessage(playerid, 0x00FF00AA, "[Server] You kidnapped someone"); } else { SendClientMessage(playerid, COLOR_RED, "[Server] You must be near the player you want to kidnap"); } } else { SendClientMessage(playerid, COLOR_RED, "[Server] You are not a kidnapper!"); } } return 1; }
Thanks Admigo