Skin changer probleem.
Featured Replies
Recent actief 0
- Er zijn hier geen geregistreerde gebruikers aanwezig.
Een betere weg om onze GTA community te volgen. Leer meer.
Een volledig scherm app op het beginscherm inclusief notificaties, badges en meer.
Hallo,
Mijn jobsystem heeft een policeman's job en omdat er zoveel skins voor Cops beschikbaar zijn, heb ik een selectie-box met skins toegevoegd. Hiermee kunnen cops hun skin in bijna alle beschikbare veranderen. Deze skins moeten uiteraard alleen door cops kunnen worden gekozen, maar hier heb ik een paar problemen mee. Het systeem moet dus controleren of degene die het box-command gebruikt cop is. Hier heb ik een stukje van mijn script:
if (strcmp(cmdtext, "/dropoff", true)== 0) for(new i=0; i<MAX_PLAYERS; i++) if(gTeam[i] == TEAM_TRUCKDRIVER) { SetPlayerCheckpoint(playerid, 2797.0742, -2399.6660, 14.2260, 4); format(string3, sizeof(string3), "Take a trailer and drop it off at the docks"); GameTextForPlayer(playerid, string3, 3000, 5); return 1; ---------------------------------------- //Dit stukje werkt hetzelfde, deze werkt wel. } if(strcmp("/changecskin", cmdtext, true) == 0) for(new i=0; i<MAX_PLAYERS; i++) if(gTeam[i] == TEAM_POLICE) //indentificeerd het team { new listitems[] = "1\tSkin 1\n2\tSkin 2\n3\tSkin 3\n4\tSkin 4\n5\tSkin 5\n6\tSkin 6\n7\tSkin 7\n8\tSkin 8\n9\tSkin 9\n10\tSkin 10\n11\tSkin 11"; ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Choose your cop-skin",listitems,"OK","Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1 && response == 1) { if(listitem == 0) { SetPlayerSkin( playerid, 71); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 1"); } if(listitem == 1) { SetPlayerSkin(playerid, 265); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 2"); } if(listitem == 2) { SetPlayerSkin(playerid, 266); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 3"); } if(listitem == 3) { SetPlayerSkin(playerid, 267); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 4"); } if(listitem == 4) { SetPlayerSkin(playerid, 274); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 5"); } if(listitem == 5) { SetPlayerSkin(playerid, 275); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 6"); } if(listitem == 6) { SetPlayerSkin(playerid, 280); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 7"); } if(listitem == 7) { SetPlayerSkin(playerid, 281); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 8"); } if(listitem == { SetPlayerSkin(playerid, 282); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 9"); } if(listitem == 9) { SetPlayerSkin(playerid, 283); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 10"); } if(listitem == 10) { SetPlayerSkin(playerid, 284); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 11"); } if(listitem == 11) { SetPlayerSkin(playerid, 288); SendClientMessage(playerid, COLOR_YELLOW, "You have chosen Cop-skin 12"); } return 1; } return 1; }Het indentificeer-stukje werkt niet, waardoor iedereen het command kan gebruiken. Wie weet wat er mis gaat?
sean5874
Bewerkt: door sean5874