19.08.2009, 08:35
pawn Код:
dcmd_up(playerid,params[])
{
if(PlayerInfo[playerid][LoggedIn]!=1) return SendClientMessage(playerid,red,"You must be logged.");
if(PlayerInfo[playerid][Level]<2 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You're not an admin.");
new
tmp[128],
idx,
adminame[MAX_PLAYER_NAME],
PlayerName[MAX_PLAYER_NAME],
Float:x,
Float:y,
Float:z;
tmp=strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientmessage(playerid,red,"USAGE: /up [playerid]");
if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid,red,"Not connected.");
GetPlayerName(strval(tmp),PlayerName,sizeof(PlayerName));
GetPlayerName(playerid,adminname,sizeof(adminname);
CMDMessageToAdmins(playerid,"/up");
GetPlayerPos(strval(tmp),x,y,z);
SetPlayerPos(strval(tmp),x,y,z+5);
PlayerPlaySound(strval(tmp),1190,0.0,0.0,0.0);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
return 1;
}