Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/eventtp", cmdtext, true, 10) == 0)
- {
- 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 id,amount;
- new Float:X,Float:Y,Float:Z;
- if(dialogid==1)
- {
- if(response)
- {
- if(strlen(inputtext) > 0)
- {
- amount=strval(inputtext);
- for(new i=1;i<=amount;i++)
- {
- 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)
- {
- id=strval(inputtext);
- GetPlayerPos(playerid,X,Y,Z);
- Y=Y+1;
- SetPlayerPos(id,X,Y,Z);
- return 1;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment