17.06.2011, 15:33
this is the command
Quote:
if(strcmp(cmd, "/gethere", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethere [playerid/PartOfName]"); return 1; } new Float ![]() ![]() ![]() new plo; plo = ReturnUser(tmp); GetPlayerName(playerid,sendername,sizeof(sendernam e)); GetPlayerName(plo, giveplayer, sizeof(giveplayer)); if (IsPlayerConnected(plo)) { if(plo != INVALID_PLAYER_ID) { if (PlayerInfo[playerid][pAdmin] >= 4) { GetPlayerPos(playerid, plocx, plocy, plocz); if(PlayerInfo[playerid][pInt] > 0) { SafeSetPlayerInterior(plo,PlayerInfo[playerid][pInt]); PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal]; } if(PlayerInfo[playerid][pInt] == 0) { SafeSetPlayerInterior(plo,0); } if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8 { SafeSetPlayerInterior(plo,1); PlayerInfo[plo][pInt] = 1; } if (GetPlayerState(plo) == 2) { TelePos[plo][0] = 0.0; TelePos[plo][1] = 0.0; new tmpcar = GetPlayerVehicleID(plo); SetVehiclePos(tmpcar, plocx, plocy+4, plocz); } else { SafeSetPlayerPos(plo,plocx,plocy+2, plocz); } SetPlayerVirtualWorld(plo, PlayerInfo[playerid][pVirWorld]); format(string,sizeof(string), "[ADMIN]: %s Has teleported to %s (%d) at their Pos",sendername,giveplayer,plo); ABroadCast(COLOR_LIGHTRED,string, 5); DisablePlayerCheckpoint(plo); OnPlayerExitFood(plo); if(BizzEntered[playerid] != 9999) { BizzEntered[plo] = BizzEntered[playerid]; } new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Teleported %s to Himself",d,m,y,h,mi,s,sendername,giveplayer); AdminLog(string); } else { SendClientMessage(playerid, COLOR_GRAD1, "** you are not authorized to use that command!"); } } } else { format(string, sizeof(string), "* %d is not an active player.", plo); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; } |