SA-MP Forums Archive
[HELP]Please help to Goto system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Please help to Goto system (/showthread.php?tid=204101)



[HELP]Please help to Goto system - buzifej - 28.12.2010

if(strcmp(cmdtext, "/tgoto", true) == 0)
{
SetPVarInt(playerid, "nogoto", 0);

SendClientMessage( playerid, COLOR_RED, "*Your has been disabled goto!");

return 1;
}





if(strcmp(cmdtext, "/goto", true) == 0)
{
if( GetPlayerVirtualWorld( player1 ) != 0 || GetPlayerInterior( player1 ) != 0 ) {
//Nem hasznбlhatja
SendClientMessage( playerid, COLOR_RED, "*Player on the virtual wolrd! Don't goto!");








if(!strlen(tmp)) return SendClientMessage(playerid,red,"/goto [playerid]");
new player1, string[128];
tmp = strtok(cmdtext, idx);
if(!IsNumeric(tmp)) player1 = ReturnPlayerID(tmp);
else player1 = cmd = strtok(cmdtext, idx);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {


new Float, Float:y, Float:z; GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(playe r1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWor ld(player1));
if(GetPlayerState(playerid) == 2) {
SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z ); LinkVehicleToInterior(GetPlayerVehicleID(playerid) ,GetPlayerInterior(player1));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid ),GetPlayerVirtualWorld(player1));
if(GetPVarInt(id, "nogoto") == 1) SendClientMessage(playerid, red, "The player %s (%d) has disabled goto! ", pNick(id), id);




} else {
} else SetPlayerPos(playerid,x+2,y,z);


format(string,sizeof(string),"You teleported to: \"%s\"", pName(player1));
return SendClientMessage(playerid,blue,string);
} else return SendClientMessage(playerid, red, "Do not yourself ");

}
}


Re: [HELP]Please help to Goto system - Mean - 28.12.2010

And, what is exactly the problem ? lawl...


Re: [HELP]Please help to Goto system - _rAped - 28.12.2010

Well..

You got to change one of them.
pawn Код:
SetPVarInt(playerid, "nogoto", 0);
pawn Код:
if(GetPVarInt(id, "nogoto") == 1)
Btw. Put your code in [pawn] brackets.