08.06.2015, 10:09
PS: I have a command / showtheway showing someone Checkpoint, and it goes
Код:
COMMAND:showtheway(playerid, params[]) { if(PlayerInfo[playerid][pAdminlevel] == 0 && PlayerInfo[playerid][pModLevel] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa fi un Moderator pentru a folosi aceasta comanda."); new user; if(sscanf(params, "u", user)) return SendClientMessage(playerid, COLOR_GREY, "FOLOSESTE: /showtheway [playerid]"); if(user == INVALID_PLAYER_ID) sscanf(params, "i", user); if(user > MAX_PLAYERS) user = DeterminePlayerID(user); if(!IsPlayerConnected(user)) return SendClientMessage(playerid, COLOR_GREY, "playerID invalid (playerID-ul solicitat de tine nu este conectat)."); if(IsPlayerNPC(user)) return SendClientMessage(playerid, COLOR_GREY, "playerID invalid (playerID-ul introdus de tine este un NCP)."); PlayerInfo[playerid][pShowtheway_ID] = user; format(gVar3000, sizeof(gVar3000), "%s", EOS); for(new i = 0; i != sizeof(Locs); i++) { if(isnull(gVar3000)) format(gVar3000, sizeof(gVar3000), "%s", Locs[i][locName]); else format(gVar3000, sizeof(gVar3000), "%s\n%s", gVar3000, Locs[i][locName]); } ShowPlayerDialog(playerid, DIALOG_SHOW_LOCATIONS, DIALOG_STYLE_LIST, "{FF9900}Locatii", gVar3000, "Mark", "Cancel"); return format(gVar3000, sizeof(gVar3000), "%s", EOS); }
Код:
else if(dialogid == DIALOG_SHOW_LOCATIONS && response) { new message[150]; format(message, 150, "%s %s{FFFFFF} successfully marked {FF6347}%s{FFFFFF} on your map."); SendClientMessage(PlayerInfo[playerid][pShowtheway_ID], -1, message); format(message, 150, "You have successfully marked {FF6347}%s{FFFFFF} on the player {FF6347}%s{FFFFFF}'s map.",Locs[listitem][locName], GetNameWithSpace(PlayerInfo[playerid][pShowtheway_ID])); SendClientMessage(playerid, -1, message); SendClientMessage(PlayerInfo[playerid][pShowtheway_ID], -1, "In order to remove the checkpoint, type {FF6347}/killcheckpoint{FFFFFF}."); PlayerInfo[playerid][pLocations] = SetPlayerRaceCheckpoint(PlayerInfo[playerid][pShowtheway_ID], 2, Locs[listitem][locX], Locs[listitem][locY], Locs[listitem][locZ], 0, 0, 0, 3.0); }