27.04.2014, 19:23
Erros:
[/COLOR]
Script Lines:
Код HTML:
C:\Users\Jacob\Desktop\New folder\gamemodes\RP.pwn(240) : error 017: undefined symbol "muted" C:\Users\Jacob\Desktop\New folder\gamemodes\RP.pwn(240) : warning 215: expression has no effect C:\Users\Jacob\Desktop\New folder\gamemodes\RP.pwn(240) : error 001: expected token: ";", but found "]" C:\Users\Jacob\Desktop\New folder\gamemodes\RP.pwn(240) : error 029: invalid expression, assumed zero C:\Users\Jacob\Desktop\New folder\gamemodes\RP.pwn(240) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Script Lines:
Код HTML:
public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 1)
{
SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B}You can not talk while your muted.");
return 0;
}
return 1;
}
CMD:slap(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,pName[MAX_PLAYER_NAME],Float:x,Float:y,Float:z,string[124];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /slap (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got slapped by an administrator.",pName);
SendClientMessageToAll(-1,string);
GetPlayerPos(target,x,y,z);
SetPlayerPos(target,x,y,z+15);
return 1;
}
CMD:banip(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new ip[44],string[124];
if(sscanf(params,"s[44]",ip)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /ban (playerid).");
format(string,sizeof(string),"banip %s",ip);
SendRconCommand(string);
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got (IP)banned by an administrator.",ip);
SendClientMessage(playerid,-1,string);
PlayerPlaySound(playerid, 1009, 0.0, 0.0, 0.0);
return 1;
}
CMD:freeze(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,string[124],pName[24];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /freeze (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"ERROR:Player not connected.");
GetPlayerName(target,pName,24);
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got frozen by an administrator.",pName);
SendClientMessageToAll(-1,string);
TogglePlayerControllable(target,0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:unfreeze(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,string[124],pName[24];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /unfreeze (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected .");
GetPlayerName(target,pName,24);
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got unfrozen by an administrator.",pName);
SendClientMessageToAll(-1,string);
TogglePlayerControllable(target,1);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:goto(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,Float:x,Float:y,Float:z;
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /goto (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected");
GetPlayerPos(target,x,y,z);
SetPlayerPos(playerid,x,y,z);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:get(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,Float:x,Float:y,Float:z;
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /get (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(target,x,y,z);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:mute(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,string[124],pName[24];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} Use /mute (playerid).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got muted by an administrator.",pName);
SendClientMessageToAll(-1,string);
muted[target] = 1;
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
return 1;
}
CMD:unmute(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,string[124],pName[24];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{FF0000}[Usage]: {FFFF00}/Unmute (PlayerID).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got unmuted by an administrator.",pName);
SendClientMessageToAll(-1,string);
muted[target] = 0;
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:kick(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,reason[66],string[124],pName[24];
if(sscanf(params,"us[66]",target,reason)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B}/kick (PlayerID) (Reason).");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got unmuted by an administrator.[ Reason: %s ]",pName,reason);
SendClientMessageToAll(-1,string);
Kick(target);
PlayerPlaySound(playerid, 1009, 0.0, 0.0, 0.0);
return 1;
}
CMD:ban(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,reason[66],string[124],pName[24];
if(sscanf(params,"us[66]",target,reason)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B} /Ban (PlayerID) (Reason)");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{F83934}[System]:{8B8B8B} %s got banned by a administrator - [ Reason: %s ]",pName,reason);
SendClientMessageToAll(-1,string);
Ban(target);
PlayerPlaySound(playerid, 1009, 0.0, 0.0, 0.0);
return 1;
}
CMD:ip(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,pIP[34],pName[24],string[124];
if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"{F83934}[Usage]:{8B8B8B}/IP (PlayerID)");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
GetPlayerName(target,pName,sizeof(pName));
GetPlayerIp(target,pIP,34);
format(string,sizeof(string),"{FFFF00}%s's IP is %s",pName,pIP);
SendClientMessage(playerid,-1,string);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
CMD:setlevel(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
new target,level,string[124],pName[24];
if(sscanf(params,"ud",target,level)) return SendClientMessage(playerid,-1,"{FF0000}[Usage]: {FFFF00}/Setlevel (PlayerID) (Level)");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} Player is not connected.");
if(level < 0 || level > 3) return SendClientMessage(playerid,-1,"{F83934}[Error]:Invalid level. (1 - 3)");
GetPlayerName(target,pName,sizeof(pName));
SendClientMessageToAll(-1,string);
PlayerInfo[target][pAdmin] = level;
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}
COMMAND:spec(playerid, params[])
{
new id;
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "{F83934}[Usage]:{8B8B8B}/Spec (ID)");
if(id == playerid)return SendClientMessage(playerid,Grey,"{F83934}[Error]:{8B8B8B} You Cannot Spectate Yourself");
if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, Grey, "{F83934}[Error]:Player Not Found");
if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,"{F83934}[Error]:You Are Already Spectating Somebody");
GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
Inter[playerid] = GetPlayerInterior(playerid);
vWorld[playerid] = GetPlayerVirtualWorld(playerid);
TogglePlayerSpectating(playerid, true);
if(IsPlayerInAnyVehicle(id))
if(GetPlayerInterior(id) > 0)
{
SetPlayerInterior(playerid,GetPlayerInterior(id));
}
else if(GetPlayerVirtualWorld(id) > 0)
{
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
}
PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
{
if(GetPlayerInterior(id) > 0)
{
SetPlayerInterior(playerid,GetPlayerInterior(id));
}
if(GetPlayerVirtualWorld(id) > 0)
{
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
}
PlayerSpectatePlayer(playerid,id);
}
GetPlayerName(id, Name, sizeof(Name));
format(String, sizeof(String),"{F83934}[System]:{8B8B8B} You're now Spectating %s.",Name);
SendClientMessage(playerid,0x0080C0FF,String);
IsSpecing[playerid] = 1;
IsBeingSpeced[id] = 1;
spectatorid[playerid] = id;
return 1;
}
COMMAND:specoff(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"{F83934}[Error]:{8B8B8B} You're not authorized to use this command.");
TogglePlayerSpectating(playerid, 0);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));
}
}
}
}
if(newstate == PLAYER_STATE_ONFOOT)
{
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
PlayerSpectatePlayer(i, playerid);
}
}
}
}
return 1;
}

