if(strcmp(cmd, "/gotocoord", true) == 0)
{
if(gAdminOnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command");
return 1;
}
new x = strval(tmp);
new y = strval(tmp);
new z = strval(tmp);
SetPlayerPos(playerid, x, y, z);
SendClientMessage(playerid, COLOR_DBLUE, "You have been teleported");
return 1;
}
cmd(gotoc, playerid, params[])
{
if(GetPVarInt(playerid, "Admin") > 2){
new Float:x, Float:y, Float:z, intt;
if(sscanf(params, "fffi", x, y, z, intt))return SendClientMessage(playerid, grey, "/gotoc [float1] [float2] [float3] [int]");
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, intt);}
return 1;
}
if(strcmp(cmd, "/gotocoord", true) == 0) { if(gAdminOnDuty[playerid] != 1) { SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!"); return 1; } if (PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command"); return 1; } tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new x = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new y = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new z = strval(tmp); SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, COLOR_DBLUE, "You have been teleported"); return 1; }
Originally Posted by Antonio (eternalrp.webatu.com)
Hmms.
|
Originally Posted by Coole[AG
]
Код:
if(strcmp(cmd, "/gotocoord", true) == 0) { if(gAdminOnDuty[playerid] != 1) { SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!"); return 1; } if (PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command"); return 1; } tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new x = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new y = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new z = strval(tmp); SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, COLOR_DBLUE, "You have been teleported"); return 1; } |
Originally Posted by Shady91
Quote:
|
Originally Posted by Coole[AG
]
Код:
if(strcmp(cmd, "/gotocoord", true) == 0) { if(gAdminOnDuty[playerid] != 1) { SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!"); return 1; } if (PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command"); return 1; } tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new x = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new y = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /gotocoord (X) (Y) (Z)"); new z = strval(tmp); SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, COLOR_DBLUE, "You have been teleported"); return 1; } |