468COMMAND:radio(playerid, params[])
469{
470 GetPlayerName(playerid,pname,sizeof(pname));
471 if(Leader[playerid] == 3)
472 {
473 format(String,MAX_PLAYERS, "** Command Chief Master %s: %s, over **",pname);
474 SendClientMessageToAll(0x8F8F8FFF,String);
475 return 1;
476 }
477 else if Member[playerid] == 3)
478 {
479 format(String,MAX_PLAYERS, "** Member %s: %s, over **",pname);
480 SendClientMessageToAll(0x8F8F8FFF,String);
481 return 1;
482 }
483 return 1;
484}
(477) : error 001: expected token: "*then", but found ")"
(477) : error 029: invalid expression, assumed zero
(483) : warning 225: unreachable code
(483) : warning 217: loose indentation
COMMAND:radio(playerid, params[])
{
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,pname,sizeof(pname));
if(Leader[playerid] == 3)
{
format(string,MAX_PLAYERS, "** Command Chief Master %s: %s, over **",pname);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Member[playerid] == 3)
{
format(string,MAX_PLAYERS, "** Member %s: %s, over **",pname);
SendClientMessageToAll(0x8F8F8FFF,string);
}
return 1;
}
pawn Код:
|
pwn(485) : warning 204: symbol is assigned a value that is never used: "name"
new name[MAX_PLAYER_NAME],string[128];
playername3
My appologies, replace "name" in the new statement with "pname".
|
COMMAND:radio(playerid, params[])
{
if (!strlen(params[0])) return SendClientMessage(playerid,White,"Usage: /radio [Message]");
new pname[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,pname,sizeof(pname));
if(Leader[playerid] == 3)
{
format(string,sizeof (string), "** Command Chief Master %s: %s, over **",pname, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
else if(Member[playerid] == 3)
{
format(string, sizeof (string), "** Member %s: %s, over **",pname, params[0]);
SendClientMessageToAll(0x8F8F8FFF,string);
}
return 1;
}
maybe this
pawn Код:
|
COMMAND:setleader(playerid, params[])
{
new id,oleader;
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, 0xFF0000FF, "Only RCON admins can use this command!!");
if(sscanf(params,"ui", id,oleader))return SendClientMessage(playerid, 0x33CCFFAA, "Usage: /setleader [PlayerID] [TeamID 1 - 3] Teams: ID 1: Airwolves. ID 2: Bluefoxes. ID 3: Thunderbirds");
if(oleader > 9)return SendClientMessage(playerid,red,"Please type /orgids");
if(oleader == 1)//Set Leader to Airwolves.
{
GetPlayerName(playerid, Name, sizeof(Name));
format(String, sizeof(String), "%s has set you the leader of Airwolves.",Name);
SendClientMessage(id,green, String);
SetPlayerColor(id,COLOR_GREY);
SetPlayerTeam(id, 1);
SetPlayerSkin(id, 61);
SetPlayerPos(id, 1607.7803,1169.4840,14.2188);
GivePlayerWeapon(id,36, 75); //HS Rocket Launcher **
GivePlayerWeapon(id,27, 100); //Combat Shotgun
GivePlayerWeapon(id, 38, 100); //Minigun
GivePlayerWeapon(id, 30, 350); //AK-47
Leader[id] = 1;
Member[id] = 1;
IsInOrg[id] = 1;
OrgId[id] = 1;
IsLaw[id] = 0;
IsPriv[id] = 1;
IsGang[id] = 0;
IsRequesting[id] = 0;
request[id] = 0;
format(String, sizeof(String), "You have set a new leader for Airwolves.",Name);
SendClientMessage(playerid,green, String);
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,30,200); //AK-47
SetPlayerTeam(playerid, 0);
SetPlayerColor(playerid, COLOR_RED);
FSave[playerid] = SetTimerEx("Save",1000,true,"i",playerid);//This creates a timer when the player spawns and it saves the file ever 1 second.
if(Member[playerid] == 1)
{
SetPlayerColor(playerid,COLOR_GREY);
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 255);
SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
GivePlayerWeapon(playerid,36,60); //HS Rocket Launcher **
GivePlayerWeapon(playerid,27,100); //Combat Shotgun
GivePlayerWeapon(playerid,30,200); //AK-47
SendClientMessage(playerid,COLOR_GREY,"Combat Team: Airwolves.");
}