14.04.2017, 08:15
Hi guys! Im scripting CNR server and i scripted dialog where you choose your team but i have problem:
When player spawns he have default CJ skin and no weapons... Any help?
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_CHOOSETEAM) { if(response) { switch(listitem) { case 0: { SetSpawnInfo(playerid, TEAM_COPS, 266, 1543.4292,-1675.7469,13.5564, 0, 3, 0, 31, 500, 24, 200); SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You are now police officer!"); SetPlayerTeam(playerid, TEAM_COPS); SetPlayerColor(playerid, COLOR_BLUE); SpawnPlayer(playerid); } case 1: { SetSpawnInfo(playerid, TEAM_ROBBERS, 106, 2474.8865,-1683.4730,13.4256, 0, 30, 300, 28, 300, 24, 200); SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You are now robber!"); SetPlayerTeam(playerid, TEAM_ROBBERS); SetPlayerColor(playerid, COLOR_ORANGE); SpawnPlayer(playerid); } } } else { Kick(playerid); } } return 1; }