28.12.2010, 20:02
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 ");
}
}
{
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
![angry](images/smilies/mad.gif)
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 ");
}
}