CMD:gethere(playerid, params[]) { new giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gethere [playerid]"); new Float:plocx,Float:plocy,Float:plocz; if (IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin]) { SendClientMessageEx(playerid, COLOR_WHITE, "You can't perform this action on an equal or higher level administrator."); return 1; } if (PlayerInfo[playerid][pAdmin] >= 2) { if(GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING) { SendClientMessageEx(playerid, COLOR_GRAD2, "That player is spectating someone."); return 1; } GetPlayerPos(playerid, plocx, plocy, plocz); Streamer_UpdateEx(giveplayerid, plocx, plocy, plocz); SetPVarInt(playerid, "BeingTeleported", 1); SetPlayerVirtualWorld(giveplayerid, PlayerInfo[playerid][pVW]); PlayerInfo[giveplayerid][pLocal] = PlayerInfo[playerid][pLocal]; if (GetPlayerState(giveplayerid) == 2) { TelePos[giveplayerid][0] = 0.0; TelePos[giveplayerid][1] = 0.0; new tmpcar = GetPlayerVehicleID(giveplayerid); SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(GetPlayerVehicleID(giveplayerid), GetPlayerInterior(playerid)); SetPlayerInterior(giveplayerid, GetPlayerInterior(playerid)); SetVehicleVirtualWorld(GetPlayerVehicleID(giveplayerid), GetPlayerVirtualWorld(playerid)); SetPlayerVirtualWorld(giveplayerid, GetPlayerVirtualWorld(playerid)); } else { SetPlayerPos(giveplayerid,plocx,plocy+2, plocz); SetPlayerInterior(giveplayerid, GetPlayerInterior(playerid)); SetPlayerVirtualWorld(giveplayerid, GetPlayerVirtualWorld(playerid)); } SendClientMessageEx(giveplayerid, COLOR_GRAD1, " You have been teleported!"); } else { SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!"); } } else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified."); return 1; }
CMD:lgoto(playerid, params[])
{
new Float:x, Float:y, Float:z, string[128];
if(sscanf(params, "fff", x, y, z)) return Msg(playerid, color, ""#gold"[USAGE]: "#blue"/lgoto <x> <y> <z>");
if(GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
else SetPlayerPos(playerid,x,y,z);
format(string,sizeof(string),""#blue"You have gone to the coordinates "#red"X: %.2f, "#pink"Y: %.2f, "#ice"Z: %.2f", x,y,z); Msg(playerid,color,string);
Sound(playerid,1054);
return 1;
}
new string[700], id, reason[70], day, month, year, hour, minute, second;
new ActualDay, ActualMonth, ActualYear, ActualHour, ActualMinute, ActualSecond;
if(sscanf(params, "ds[70]dddddd", id, reason, day, month, year, hour, minute, second)) return Msg(playerid, color, ""#gold"[USAGE]: "#blue"/ban <playerid> <reason> <unban day> <unban month> <unban year> <unban hour> <unban minute> <unban second>");
The "u" on sscanf is meant for User name/id (bots and players), and it may be bugging your code.
Why don't you simple put "d" for player's ID? Else, I'd suggest you put "r", that's meant for Player name/id. May not work, since I just used Float, String, Integer on the Sscanf. |