Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Declare xyz globaly
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (!strcmp("/eventtp", cmdtext, true))
- {
- GetPlayerPos(playerid,X,Y,Z);
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Amount","What amount of players u want to tp?","OK","Cancel");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new amount,i;
- if(dialogid==1)
- {
- if(response)
- {
- if(strlen(inputtext) > 0)
- {
- amount=strval(inputtext);
- i = 0;
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"ID","Enter the ID of the player u want to tp.","OK","Cancel");
- }
- }
- return 1;
- }
- if(dialogid==2)
- {
- if(response)
- {
- if(strlen(inputtext) > 0)
- {
- new id;
- id = strval(inputtext);
- Y = Y + 2;
- SetPlayerPos(id,X,Y,Z);
- i++;
- if(i < amount)
- {
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"ID","Enter the ID of the player u want to tp.","OK","Cancel");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement