27.09.2012, 19:17
Hello all!
i have a problem with cmds.
1)
2) i need the /pm cmd
Thanx!
i have a problem with cmds.
1)
pawn Код:
/adjust name
[QUOTE]CMD:adjust(playerid, params[])
{
if(PlayerInfo[playerid][pFMember] == 255)
{
SendClientMessageEx(playerid, COLOR_GREY, "You aren't in a family.");
return 1;
}
new family = PlayerInfo[playerid][pFMember];
new string[128];
if(PlayerInfo[playerid][pRank] == 6)
{
new choice[32], opstring[100];
if(sscanf(params, "s[32]S[100]", choice, opstring))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /adjust [name]");
SendClientMessageEx(playerid, COLOR_WHITE, "Available Names: Name, MOTD, Safe, Invite, Uninvite");
return 1;
}
if(strcmp(choice,"name",true) == 0)
{
if(PlayerInfo[playerid][pRank] == 6)
{
if(!opstring[0])
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /adjust name [family name]");
return 1;
}
if(strfind(opstring, "|", true) != -1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You can't use '|' in a family name.");
return 1;
}
if(strlen(opstring) >= 40 )
{
SendClientMessageEx( playerid, COLOR_GRAD1, "That family name is too long, please refrain from using more than 40 characters." );
return 1;
}
strmid(FamilyInfo[family][FamilyName], opstring, 0, strlen(opstring), 100);
SaveFamilies();
SendClientMessageEx(playerid, COLOR_WHITE, "You've adjusted your family's name.");
format(string, sizeof(string), "%s adjusted family %d's name to %s", GetPlayerNameEx(playerid), family+1, opstring);
Log("logs/family.log", string);
}
}
2) i need the /pm cmd
Thanx!