dcmd_g(playerid, params[]) { new id; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /goto [nick/id]"); if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not connected."); new Float:Pos[3]; if(IsPlayerInAnyVehicle(playerid)) { GetPlayerPos(id, Pos[0], Pos[1], Pos[2]); SetVehiclePos(GetPlayerVehicleID(playerid), Pos[0]+2, Pos[1], Pos[2]); PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0); SetPlayerInterior(playerid, GetPlayerInterior(id)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); } else { GetPlayerPos(id, Pos[0], Pos[1], Pos[2]); SetPlayerPos(playerid, Pos[0]+1, Pos[1], Pos[2]); SetPlayerInterior(playerid, GetPlayerInterior(id)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); } return 1; } dcmd_get(playerid, params[]) { new id; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /gethere [nick/id]"); if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not connected."); new Float:Pos[3]; if(IsPlayerInAnyVehicle(id)) { GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SetVehiclePos(GetPlayerVehicleID(id), Pos[0]+2, Pos[1], Pos[2]); PutPlayerInVehicle(id, GetPlayerVehicleID(id), 0); SetPlayerInterior(playerid, GetPlayerInterior(id)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); } else { GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SetPlayerPos(id, Pos[0]+1, Pos[1], Pos[2]); SetPlayerInterior(playerid, GetPlayerInterior(id)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); } return 1; } dcmd_explode(playerid, params[]) { new id,toplayerid; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /explode [nick/id]"); if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not connected!"); new expString[128], adminName[24], exploName[24]; GetPlayerName(playerid, adminName, 24); GetPlayerName(toplayerid, exploName, 24); format(expString, 128, "Player %s was exploded by Administrator %s.", exploName, adminName); SendClientMessageToAll(COLOR_RED, expString); new str[100]; format(str,sizeof str,"0,4Player %s was exploded by Administrator %s.", exploName, adminName); IRC_GroupSay(gGroupID, IRC_CHANNEL, str); new Float:Pos[3]; GetPlayerPos(id, Pos[0], Pos[1], Pos[2]); CreateExplosion(Pos[0], Pos[1], Pos[2], 0, 10.0); return 1; } dcmd_slap(playerid, params[]) { new id,toplayerid; if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "SYNTAX: /slap [nick/id]"); if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not connected!"); new slString[128], adminName[24], slapName[24]; GetPlayerName(playerid, adminName, 24); GetPlayerName(toplayerid, slapName, 24); format(slString, 128, "Player %s was slapped by Administrator %s.", slapName, adminName); SendClientMessageToAll(COLOR_RED, slString); new str[100]; format(str,sizeof str,"0,4Player %s was slapped by Administrator %s.", slapName, adminName); IRC_GroupSay(gGroupID, IRC_CHANNEL, str); new Float:Pos[3]; GetPlayerPos(id, Pos[0], Pos[1], Pos[2]); SetPlayerPos(id, Pos[0], Pos[1], Pos[2]+7); return 1; }
if(PlayerInfo[playerid][AdminLevel] > 2)
And you are sure that you closed the if statment again ?
And what kind of errors ? |
#include <PlayerCommands> enum PInfo { // your fields here } new PlayerInfo[MAX_PLAYERS][PInfo];
enum PInfo { // your fields here } new PlayerInfo[MAX_PLAYERS][PInfo]; #include <PlayerCommands>
main() { print("\n----------------------------------"); print("BLA BLA BLA"); print("----------------------------------\n"); } enum pInfo { AdminLevel, Cash, Score, Deaths, } new PlayerInfo[MAX_PLAYERS][pInfo];
Hey, thanks for leaving my credits on the commands... (yes, I am being sarcastic)
|
Yes im sure.
Pawno returns me all sort of error (undefiened symbol,etc).. |
i had the same problem because i used > and you have to use >=
try that and tell me |