08.01.2013, 18:24
Quote:
Just check if playerid is driver with
pawn Код:
|
Код:
dcmd_goto(playerid, params[]) { #pragma unused params new ID; if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_BLUE, "USAGE: /goto [ID]"); else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player is offline or it is yourself"); if(toggoto[ID] == 1) { new string[50], name[MAX_PLAYER_NAME]; format(string, sizeof(string), "%s's has Disabled goto! /toggoto", GetPlayerName(playerid, name, sizeof(name))); GameTextForPlayer(playerid,string,2000,3); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) GetVehiclePos(vehicleid, x, y, z); SetVehiclePos(vehicleid, x+3, y ,z); return 1; } else { new Float:x, Float:y, Float:z; GetPlayerPos(ID, x, y, z); SetPlayerPos(ID, x+2, y, z); } return 1; }