10.05.2009, 14:55
hi i need help
anyone know how to make a /get and a /goto command?
ty alot :P
anyone know how to make a /get and a /goto command?
ty alot :P
if(strcmp(cmd,"/goto",true)==0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFF00AA,"USAGE: /goto [playerid]"); } if(Admin[playerid] >= 1) { chosenplayer = strval(tmp); GetPlayerPos(chosenplayer,xpos[0],ypos[0],zpos[0]); SetPlayerPos(playerid,xpos[0]+2,ypos[0]+2,zpos[0]); format(string,sizeof(string),"You have been teleported to %s.",originalplayername[chosenplayer]); SendClientMessage(playerid,COLOR_RED,string); format(string,sizeof(string),"%s has teleported to you.",originalplayername[playerid]); SendClientMessage(chosenplayer,COLOR_RED,string); format(string,sizeof(string),"/getin2 %d",chosenplayer); OnPlayerCommandText(playerid,string); } }
Originally Posted by [SaRp
Ryder ]
here.. use this .. you will define the admin and other things yourself .. you need to put a little work not just ask .. but here take mine Код:
if(strcmp(cmd,"/goto",true)==0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFF00AA,"USAGE: /goto [playerid]"); } if(Admin[playerid] >= 1) { chosenplayer = strval(tmp); GetPlayerPos(chosenplayer,xpos[0],ypos[0],zpos[0]); SetPlayerPos(playerid,xpos[0]+2,ypos[0]+2,zpos[0]); format(string,sizeof(string),"You have been teleported to %s.",originalplayername[chosenplayer]); SendClientMessage(playerid,COLOR_RED,string); format(string,sizeof(string),"%s has teleported to you.",originalplayername[playerid]); SendClientMessage(chosenplayer,COLOR_RED,string); format(string,sizeof(string),"/getin2 %d",chosenplayer); OnPlayerCommandText(playerid,string); } } |
Originally Posted by MenaceX^
Who says he has your variables?
What GM do you use? Do you have any admin system? |
Originally Posted by [SaRp
Ryder ]
i use my own Gm ... Tec9 gangsta RPG .. i used to be known as [Tec9]Ryder ye i have my own admin system why ? |
if(strcmp(cmd,"/bring",true)==0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFF00AA,"USAGE: /bring [playerid]"); } if(Admin[playerid] >= 1) { chosenplayer = strval(tmp); GetPlayerPos(playerid,xpos[0],ypos[0],zpos[0]); SetPlayerPos(chosenplayer,xpos[0]+2,ypos[0]+2,zpos[0]); format(string,sizeof(string),"You brought %s to you.",originalplayername[chosenplayer]); SendClientMessage(playerid,COLOR_RED,string); format(string,sizeof(string),"%s has brought you to him.",originalplayername[playerid]); SendClientMessage(chosenplayer,COLOR_RED,string); format(string,sizeof(string),"/getin2 %d",playerid); OnPlayerCommandText(chosenplayer,string); } }
Originally Posted by [SaRp
Ryder ]
here Код:
if(strcmp(cmd,"/bring",true)==0) { tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFFFF00AA,"USAGE: /bring [playerid]"); } if(Admin[playerid] >= 1) { chosenplayer = strval(tmp); GetPlayerPos(playerid,xpos[0],ypos[0],zpos[0]); SetPlayerPos(chosenplayer,xpos[0]+2,ypos[0]+2,zpos[0]); format(string,sizeof(string),"You brought %s to you.",originalplayername[chosenplayer]); SendClientMessage(playerid,COLOR_RED,string); format(string,sizeof(string),"%s has brought you to him.",originalplayername[playerid]); SendClientMessage(chosenplayer,COLOR_RED,string); format(string,sizeof(string),"/getin2 %d",playerid); OnPlayerCommandText(chosenplayer,string); } } if the reg system you use it can save Admin[playerid] then it should be real easy to have this commands on the server |
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(26) : error 017: undefined symbol "cmd"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(28) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(30) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : warning 217: loose indentation
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : error 017: undefined symbol "Admin"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : warning 215: expression has no effect
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminSystem.pwn(34) : fatal error 107: too many error messages on one line