27.11.2010, 00:32
Not the best way to do it but it will show you how you could have done it
pawn Код:
dcmd_sellgun( playerid, params[] )
{
new otherid, wepname[50];
new string[64], PlayerName[24];
new number;
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string),"xadmin/Users/%s.ini", udb_encode(PlayerName));
number = dini_Int(string, "Job");
if(number != 6) return SendClientMessage(playerid, CHAT_COLOR_RED, "You are not an Arms Dealer!");
else if(sscanf(params, "us", otherid, wepname)) return SendClientMessage(playerid, CHAT_COLOR_RED, "Use: Blah!");
else if(otherid == INVALID_PLAYER_ID) return SendClientMessage(playerid, CHAT_COLOR_RED, "Invalid Player ID!");
else
{
SendClientMessage(playerid, CHAT_COLOR_RED, "Works");
SendClientMessage(playerid, CHAT_COLOR_RED, "Yeey :D");
}
return 1;
}