Error Compile
#1

Okay a friend send me some HRP commands and i attempting to input it in my script
But of course i get some errors could you help me please?

here is my errors

Quote:

C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(100 : error 029: invalid expression, assumed zero
C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(1030) : error 017: undefined symbol "PlayerInfo"
C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(1030) : warning 215: expression has no effect
C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(1030) : error 001: expected token: ";", but found "]"
C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(1030) : error 029: invalid expression, assumed zero
C:\Users\JakkenKoppen\Desktop\o\Bone County Script\gamemodes\Commands.pwn(1030) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

and here is my commands that i am trying to input

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
CMD:toggc(playerid, params[])
{
if(GlobalChat[playerid] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You have enabled global chat, use /g to chat.");
GlobalChat[playerid] = 1;
}
else if(GlobalChat[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You have disabled global chat.");
GlobalChat[playerid] = 0;
}
return 1;
}

CMD:g(playerid, params[])
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(PlayerInfo[playerid][pGCMuted] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're muted from this channel.");
return 1;
}
new string[128];
if(GlobalChatTimer[playerid] > 0)
{
format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", GlobalChatTimer[playerid]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
if(GlobalChat[playerid] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in the global chat, type /toggc.");
return 1;
}

if(isnull(params))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/g) [text]");

if(strlen(params) > 80)
return SendClientMessage(playerid, COLOR_GREY, "Your message is too long - the limit is 80 characters.");

if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 1)
{
format(string, sizeof(string), "(( Ruby Donator %s: %s ))", GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 2)
{
format(string, sizeof(string), "(( Sapphire Donator %s: %s ))", GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 3)
{
format(string, sizeof(string), "(( Diamond Donator %s: %s ))", GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pHelper] == 1)
{
format(string, sizeof(string), "(( Junior Helper %s: %s ))", GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 2;
}
else if(PlayerInfo[playerid][pHelper] == 2)
{
format(string, sizeof(string), "(( Senior Helper %s: %s ))", GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 2;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 1)
{
format(string, sizeof(string), "(( Level %d Player %s: %s ))", PlayerInfo[playerid][pLevel], GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDonator] == 0)
{
format(string, sizeof(string), "(( Level %d Player %s: %s ))", PlayerInfo[playerid][pLevel], GetPlayerNameEx(playerid), params);
GlobalChatTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "(( Level %d Admin %s: %s ))", PlayerInfo[playerid][pAdmin], GetPlayerNameEx(playerid), params);
}

foreach(Player, i)
{
if(GlobalChat[i] == 1)
{
SendClientMessage(i, COLOR_NEWS, string);
}
}
return 1;
}

CMDetadminname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 9999
{
/*if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}*/

new giveplayerid, name[32];
if(sscanf(params, "us[32]", giveplayerid, name))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setadminname [playerid/partofname] [name]");
return 1;
}

if(PlayerInfo[giveplayerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "The player is not an admin.");
return 1;
}

if(AdminDuty[giveplayerid] != 0)
{
SendClientMessage(playerid, COLOR_WHITE, "That admin is currently on-duty. They must go off-duty in order for you to set their admin name.");
return 1;
}

new length = strlen(name);
if(length < 3 || length > 20)
{
SendClientMessage(playerid, COLOR_WHITE, "The name can't less than 3 characters or more than 20 characters.");
return 1;
}

if(strfind(name, "_", true) != -1)
{
SendClientMessage(playerid, COLOR_WHITE, "The admin name must be one name. There can't be an underscore in the name.");
return 1;
}

if(strcmp(name, "Tony", true) == 0 && PlayerInfo[playerid][pAdmin] < 6) {
SendClientMessage(playerid, COLOR_WHITE, "You aren't Tony ma' nigga. You aren't Tony");
return 1;
}

new string[128];
format(string, sizeof(string), "AdmCmd: %s has set %s's admin name to '%s'.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), name);
ABroadCast(COLOR_LIGHTRED, string, 1);

format(PlayerInfo[giveplayerid][pAdminName], 32, name);
}
else SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return 1;
}

CMD:adminduty(playerid, params[]) {
return cmd_aduty(playerid, params);
}

CMD:reportsold(playerid, params[]) {
return cmd_reports(playerid, params);
}

CMD:aduty(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 2) {
if(strlen(PlayerInfo[playerid][pAdminName]) > 2 && strlen(PlayerInfo[playerid][pAdminName]) < 20) {
new string[128];
if(AdminDuty[playerid] != 0) {
if(!doesAccountExist(PlayerInfo[playerid][pAdminName])) {
if(Spectating[playerid] > 0 && PlayerInfo[playerid][pAdmin] >= 2) {
GettingSpectated[Spectate[playerid]] = 999;
Spectating[playerid] = 0;
Spectate[playerid] = 999;
SetPVarInt(playerid, "SpecOff", 1);
TogglePlayerSpectating(playerid, false);
SetCameraBehindPlayer(playerid);
}

new pState = GetPlayerState(playerid);

if(pState == PLAYER_STATE_WASTED) {
SendClientMessage(playerid, COLOR_GRAD2, "You can't do this while wasted.");
return 1;
}

DeletePVar(playerid, "MedicBill");
DeletePVar(playerid, "HospitalTimer");
DeletePVar(playerid, "Hospital");
DeletePVar(playerid, "Injured");
DeletePVar(playerid, "EMSAttempt");
DeletePVar(playerid, "MedicCall");

TogglePlayerControllable(playerid, 1);
ClearAnimations(playerid);
PlayerCuffed[playerid] = 0;
PlayerCuffedTime[playerid] = 0;
DeletePVar(playerid, "PlayerCuffed");
HouseOffer[playerid] = 999;
House[playerid] = 0;
HousePrice[playerid] = 0;
SexOffer[playerid] = 999;
SexPrice[playerid] = 0;
InviteOffer[playerid]=999;
InviteFaction[playerid]=0;
InviteFamily[playerid]=255;
PotOffer[playerid] = 999;
CrackOffer[playerid] = 999;
PotPrice[playerid]=0;
CrackPrice[playerid]=0;
PotGram[playerid]=0;
CrackGram[playerid]=0;
JailPrice[playerid]=0;
DefendOffer[playerid] = 999;
DefendPrice[playerid] = 0;
GuardOffer[playerid] = 999;
GuardPrice[playerid]=0;
GunOffer[playerid] = 999;
GunId[playerid] = 0;
GunMats[playerid] = 0;
MatsOffer[playerid] = 999;
MatsPrice[playerid] = 0;
MatsAmount[playerid] = 0;
CraftOffer[playerid] = 999;
CraftId[playerid]=0;
CraftMats[playerid]=0;
VehicleOffer[playerid] = 999;
VehiclePrice[playerid] = 0;
VehicleId[playerid] = -1;
RepairCar[playerid]=0;
OnDuty[playerid]=0;
TicketOffer[playerid] = 999;
TicketMoney[playerid] = 0;
arr_Towing[playerid] = INVALID_VEHICLE_ID;
GotHit[playerid]=0;
GoChase[playerid]=999;
GetChased[playerid]=999;
DivorceOffer[playerid] = 999;
MarryWitness[playerid] = 999;
MarryWitnessOffer[playerid] = 999;
MarriageCeremoney[playerid] = 0;
ProposeOffer[playerid] = 999;
ProposedTo[playerid] = 999;
GotProposedBy[playerid] = 999;

SetPVarInt(playerid, "washereforpaycheck", WasHereForPaycheck[playerid]);
SetPVarInt(playerid, "signedpaycheck", SignedPaycheck[playerid]);
SetPVarInt(playerid, "missedpaychecks", MissedPaychecks[playerid]);
SetPVarInt(playerid, "paycheckcode", PayCheckCode[playerid]);
SetPVarInt(playerid, "payready", PlayerInfo[playerid][pPayReady]);
SetPVarInt(playerid, "paycheck", PlayerInfo[playerid][pPayCheck]);

WasHereForPaycheck[playerid] = 0;
SignedPaycheck[playerid] = 0;
MissedPaychecks[playerid] = 0;
PayCheckCode[playerid] = 0;
DeletePVar(playerid, "LAPCReceived");
PhoneOnline[playerid] = 0;

DeletePVar(playerid, "AdminUndercover");

new username[MAX_PLAYER_NAME];
GetPVarString(playerid, "TempNameName", username, sizeof(username));
SetPVarInt(playerid, "TempName", 0);
SetPlayerName(playerid, username);

AdminDuty[playerid] = 0;
format(string, sizeof(string), "%s (ID %d - %s) is now off-duty as a Level %d Admin.", PlayerInfo[playerid][pAdminName], playerid, GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdmin]);
ABroadCast(COLOR_WHITE, string, 1);

if(PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You're now off-duty as admin, but still have access to your Level 1 Admin commands.");
}
if(PlayerInfo[playerid][pAdmin] > 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid, COLOR_YELLOW, "You're now off-duty as admin, and only have access to /admins /check /jail /ban /sban /kick /skick /showflags /reports /nrn");
}
if(PlayerInfo[playerid][pAdmin] == 6)
{
SendClientMessage(playerid, COLOR_YELLOW, "You're now off-duty as admin, but still have access to all of your commands since you're a Level 6 Admin.");
}
SendClientMessage(playerid, COLOR_REALRED, "Please remember to turn off any hacks you may have (press F12 to disable ******).");

//SetPVarInt(playerid, "F12Timer", SetTimerEx("F12Warning", 1000, true, "d", playerid));

OnPlayerLogin(playerid, AdminRelogPassword[playerid]);
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmourEx(playerid, PlayerInfo[playerid][pArmor]);

// Return paycheck stats
WasHereForPaycheck[playerid] = GetPVarInt(playerid, "washereforpaycheck");
SignedPaycheck[playerid] = GetPVarInt(playerid, "signedpaycheck");
MissedPaychecks[playerid] = GetPVarInt(playerid, "missedpaychecks");
PayCheckCode[playerid] = GetPVarInt(playerid, "paycheckcode");
PlayerInfo[playerid][pPayReady] = GetPVarInt(playerid, "payready");
PlayerInfo[playerid][pPayCheck] = GetPVarInt(playerid, "paycheck");

// Clear these vars from memory, since we don't need 'em any more
DeletePVar(playerid, "washereforpaycheck");
DeletePVar(playerid, "signedpaycheck");
DeletePVar(playerid, "missedpaychecks");
DeletePVar(playerid, "paycheckcode");
DeletePVar(playerid, "payready");
DeletePVar(playerid, "paycheck");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "This name is already registered.");
}
}
else
{
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 32);
GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
OnPlayerStatsUpdate(playerid);

PhoneOnline[playerid] = 1;

for(new i = 0; i < MAX_REPORTS; i++)
{
if(Reports[i][ReportFrom] == playerid)
{
Reports[i][ReportFrom] = 999;
Reports[i][BeingUsed] = 0;
Reports[i][TimeToExpire] = 0;
}
}

if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your hit has left the server.");
GoChase[GetChased[playerid]] = 999;
}
}
}
if(GoChase[playerid] < 999)
{
GetChased[GoChase[playerid]] = 999;
GotHit[GoChase[playerid]] = 999;
}

SetPVarInt(playerid, "TempName", 1);
new username[MAX_PLAYER_NAME];
GetPlayerName(playerid, username, sizeof(username));
SetPVarString(playerid, "TempNameName", username);

AdminDuty[playerid] = 1;
format(string, sizeof(string), "%s (ID %d - %s) is now on-duty as a Level %d Admin.",PlayerInfo[playerid][pAdminName], playerid, GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdmin]);
ABroadCast(COLOR_WHITE, string, 1);
SendClientMessage(playerid, COLOR_YELLOW, "You're now on-duty as admin and have access to all your commands, see /ah.");

SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
}
}
else SendClientMessage(playerid, COLOR_WHITE, "You need an admin name to go on-duty. Contact a Level 5+ Admin to have your admin name set.");
}
else SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return 1;
}

CMD:refund(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return 1;
}
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}

new string[128], giveplayerid, item[32], amount;
if(sscanf(params, "us[32]d", giveplayerid, item, amount))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /refund [playerid] [item] [weapon ID or amount]");
SendClientMessage(playerid, COLOR_GREY, "Available items: Gun, Mats, Pot, Crack");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
SendClientMessage(playerid, COLOR_GRAD4, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana");
SendClientMessage(playerid, COLOR_GRAD4, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane");
SendClientMessage(playerid, COLOR_GRAD3, "22: 9mm 23: Silenced 9mm 24: Desert Eagle 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5)");
SendClientMessage(playerid, COLOR_GRAD4, " 30: AK-47 31: M4 32: Tec9 33: Rifle 25: Shotgun 34: Sniper Rifle ");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
return 1;
}

new sstring[128];
if(strcmp(item, "gun", true) == 0)
{
if(amount < 1 || amount > 34 || amount == 9 || (amount >= 16 && amount <= 21) || amount == 26)
{ SendClientMessage(playerid, COLOR_GRAD1, "You can't refund that weapon ID!"); return 1; }

if(IsPlayerConnected(giveplayerid)) {
if(PlayerInfo[giveplayerid][pConnectTime] < 2 && amount != 46 && amount != 43) return SendClientMessage(playerid, COLOR_GRAD2, "That player is currently restricted from carrying weapons");
if(giveplayerid != INVALID_PLAYER_ID)
{
GivePlayerValidWeapon(giveplayerid, amount, 60000);

new weaponname[32];
GetWeaponName(amount, weaponname, sizeof(weaponname));

format(sstring, sizeof(sstring), "You have refunded %s gun ID %d (%s)!",GetPlayerNameEx(giveplayerid), amount, weaponname);
SendClientMessage(playerid, COLOR_GREEN, sstring);

format(sstring, sizeof(sstring), "Admin %s has refunded you gun ID %d (%s).", GetPlayerNameEx(playerid), amount, weaponname);
SendClientMessage(giveplayerid, COLOR_GREEN, sstring);

format(sstring, sizeof(sstring), "%s has refunded %s weapon ID %d (%s).", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), amount, weaponname);
Log("logs/refunds.log", sstring);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
if(strcmp(item, "mats", true) == 0)
{
if(amount < 1 || amount > 100000)
{
SendClientMessage(playerid,COLOR_WHITE, "The amount can't be lower than 1 or higher than 100,000.");
return 1;
}

if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pMats] += amount;
format(string, sizeof(string), "You have refunded %s %d materials!",GetPlayerNameEx(giveplayerid), amount);
SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "Admin %s has refunded you %d materials.", GetPlayerNameEx(playerid), amount);
SendClientMessage(giveplayerid, COLOR_WHITE, string);

format(string, sizeof(string), "%s has refunded %s %d materials.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), amount);
Log("logs/refunds.log", string);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
if(strcmp(item, "pot", true) == 0)
{
if(amount < 1 || amount > 100000)
{
SendClientMessage(playerid,COLOR_WHITE, "The amount can't be lower than 1 or higher than 100,000.");
return 1;
}

if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pPot] += amount;
format(string, sizeof(string), "You have refunded %s %d gram(s) of pot!",GetPlayerNameEx(giveplayerid), amount);
SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "Admin %s has refunded you %d gram(s) of pot.", GetPlayerNameEx(playerid), amount);
SendClientMessage(giveplayerid, COLOR_WHITE, string);

format(string, sizeof(string), "%s has refunded %s %d gram(s) of pot.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), amount);
Log("logs/refunds.log", string);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
if(strcmp(item, "crack", true) == 0)
{
if(amount < 1 || amount > 100000)
{
SendClientMessage(playerid,COLOR_WHITE, "The amount can't be lower than 1 or higher than 100,000.");
return 1;
}

if(IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][pCrack] += amount;
format(string, sizeof(string), "You have refunded %s %d gram(s) of crack!",GetPlayerNameEx(giveplayerid), amount);
SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "Admin %s has refunded you %d gram(s) of crack.", GetPlayerNameEx(playerid), amount);
SendClientMessage(giveplayerid, COLOR_WHITE, string);

format(string, sizeof(string), "%s has refunded %s %d gram(s) of crack.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), amount);
Log("logs/refunds.log", string);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
}
return 1;
}

CMD:gcto(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gcto [playerid/partofname] [reason]");

if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pGCMuted] == 0)
{
PlayerInfo[giveplayerid][pGCMutedTime] = 15*60;
PlayerInfo[giveplayerid][pGCMuted] = 2;
format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from using Global Chat, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
ABroadCast(COLOR_LIGHTRED,string,1);

format(string, sizeof(string), "You have been temporarily blocked from using Global Chat by %s, reason: %s.", GetPlayerNameEx(playerid), reason);
SendClientMessage(giveplayerid, COLOR_GRAD2, string);

SendClientMessage(giveplayerid, COLOR_GRAD2, "You will not be able to use Global Chat for 15 minutes.");
SendClientMessage(giveplayerid, COLOR_GRAD2, "Note the future abuse of Global Chat could result in loss of that privilege altogether or being banned from the server.");


format(string, sizeof(string), "AdmCmd: %s was temporarily blocked from Global Chat by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
Log("logs/mute.log", string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "That player is already disabled from Global Chat.");
}

}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
}
return 1;
}

CMD:gcreset(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 6)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gcoreset [playerid/partofname] [reason]");

if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pGCMuted] == 2)
{
PlayerInfo[giveplayerid][pGCMuted] = 0;
PlayerInfo[giveplayerid][pGCMutedTime] = 0;
format(string, sizeof(string), "AdmCmd: %s has unblocked %s from using Global Chat, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
ABroadCast(COLOR_LIGHTRED,string,1);

SendClientMessage(giveplayerid, COLOR_GRAD2, "You have been unblocked from using Global Chat. You may now use the Global Chat system again.");
SendClientMessage(giveplayerid, COLOR_GRAD2, "Please accept our apologies for any error and inconvenience this may have caused.");

format(string, sizeof(string), "AdmCmd: %s was unblocked from Global Chat by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid),reason);
Log("logs/mute.log", string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "That player is not temporarily disabled from Global Chat.");
}

}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
}
return 1;
}

CMD:gcmute(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 99999)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gcmute [playerid/partofname]");

if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pGCMuted] == 0)
{
PlayerInfo[giveplayerid][pGCMuted] = 1;
format(string, sizeof(string), "AdmCmd: %s has indefinitely blocked %s from using Global Chat.",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ABroadCast(COLOR_LIGHTRED,string,1);

foreach(Player, i)
{
if(GlobalChat[i] == 1 && PlayerInfo[i][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}

format(string, sizeof(string), "You have been indefinitely muted from Global Chat for abuse by %s. You may appeal this on the forums (admin complaint)", GetPlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_GRAD2, string);

format(string, sizeof(string), "AdmCmd: %s was blocked from /gc by %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
Log("logs/mute.log", string);
}
else
{
PlayerInfo[giveplayerid][pGCMuted] = 0;
PlayerInfo[giveplayerid][pGCMutedTime] = 0;
format(string, sizeof(string), "AdmCmd: %s has been re-allowed to use Global Chat by %s.",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,string,1);

foreach(Player, i)
{
if(GlobalChat[i] == 1 && PlayerInfo[i][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}

format(string, sizeof(string), "You have been re-allowed to use Global Chat by %s.", GetPlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_GRAD2, string);

format(string, sizeof(string), "AdmCmd: %s was unblocked from /gc by %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
Log("logs/mute.log", string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
}
return 1;
}



CMDpeedo(playerid, params[]) {
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) {
SendClientMessage(playerid, COLOR_GREY, "You're not driving a vehicle.");
}
else if(!PlayerInfo[playerid][pSpeedo]) {
SendClientMessage(playerid, COLOR_WHITE, "You have enabled your speedometer.");
PlayerInfo[playerid][pSpeedo] = 1;

if(!FindTimePoints[playerid]) {

new
szSpeed[42];

format(szSpeed, sizeof(szSpeed),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~%.0 f MPH", player_get_speed(playerid));
GameTextForPlayer(playerid, szSpeed, 1500, 3);
}
}
else {
SendClientMessage(playerid, COLOR_WHITE, "You have disabled your speedometer.");
PlayerInfo[playerid][pSpeedo] = 0;
if(!FindTimePoints[playerid]) GameTextForPlayer(playerid, " ", 1500, 3);
}
return 1;
}



CMDetstation(playerid, params[]) {
return cmd_setradio(playerid, params);
}

CMDetradio(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{

ShowPlayerDialogEx(playerid, DIALOG_RADIOMENU_START, DIALOG_STYLE_LIST, "Radio station", "Turn off radio\nSearch by name\nFind by genre", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not driving any vehicle.");
}
return 1;
}

Reply
#2

Do you have a register/login system? If so rename PlayerInfo to whatever you named your enum to store the playerinfo.
Reply
#3

I have a log in system but i just clicked on ''New'' and copied all these files then when i am done i am attempting to input it inside my gamemode with my other script
Reply
#4

Could u do it for me? I could send the codes?
Reply
#5

Just PM me your script and I'll take a look
Reply
#6

Quote:
Originally Posted by TonyNames
Посмотреть сообщение
Okay a friend send me some HRP commands and i attempting to input it in my script
But of course i get some errors could you help me please?

here is my errors



and here is my commands that i am trying to input
You Combine The Other Command like "setstation"(I just saw it) to OnPlayerCommand Define .. The Command You Enter Has It's Own Define.. You don't have to put the SetPlayerPos or blablabla is that ... You ALready Have one.. just Find it and Put the Command That was supposed to be there
Reply
#7

get rid of
public OnPlayerCommandText(playerid, cmdtext[])
Reply
#8

Will You Please Give me the Download Link Of the global Chat ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)