12.01.2014, 15:01
Well yes, this command
Makes:
Runtime error, file/function not found.
The getclanname stock works. I can run the server if i remove the /setclan command
pawn Код:
new levels,Nam[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME],ID;
CMD:setclan(playerid, params[])
{
if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setclan [ID] [Clan 1-4]");
if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"CLANS AVAILABLE 1-4!");
if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF0000,"That user is not connected.");
if(Clan[playerid] == levels) return SendClientMessage(playerid,0xFF0000FF, "ERROR: That person is already in this clan!");
GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
GetPlayerName(ID,pname,MAX_PLAYER_NAME);
if(Clan[playerid] == 0)
{
new string[128];
format(string, sizeof(string),"%s has assigned you to %s on the server.",Nam,GetClanName(playerid));
SendClientMessage(ID,0xFF9900AA,string);
format(string, sizeof(string),"You have assigned %s to %s!",pname,GetClanName(playerid));
SendClientMessage(playerid,0xFF9900AA,string);
Clan[playerid] = levels;
return 1;
}
new string[128];
format(string, sizeof(string),"%s has assigned you to %s on the server.",Nam,GetClanName(playerid));
SendClientMessage(ID,0xFF9900AA,string);
format(string, sizeof(string),"You have assigned %s to %s!",pname,GetClanName(playerid));
SendClientMessage(playerid,0xFF9900AA,string);
Clan[playerid] = levels;
return 1;
}
stock GetClanName(playerid)
{
new string[56];
if(Clan[playerid] == 1)
{
string = "Griffing";
}
if(Clan[playerid] == 2)
{
string = "Smygard";
}
if(Clan[playerid] == 3)
{
string = "Hеsblеs";
}
if(Clan[playerid] == 4)
{
string = "Ravnklo";
}
return string;
}
Runtime error, file/function not found.
The getclanname stock works. I can run the server if i remove the /setclan command