11.03.2011, 20:16
Code:
Function(s):
Bug:
i = Unknown123... ID 1 (Not weapon dealer)
he = Raphael... ID 0 (Waepon Dealer)
When i type /weapons then i get the message "You have requested...." (..Nothing wrong there)
But for the weapons dealer get "Raphael(1) has requested a weapon dealer in San Fierro"
But it should be "Unknown123(1) has requested a weapon dealer in San Fierro"
pawn Код:
dcmd_weapons(playerid, params[])
{
#pragma unused params
if(gTeam[playerid] == TEAM_WEAPON_DEALER) return SendClientMessage(playerid, COLOR_ERROR, "You is an bistro, You cant call for other weapon dealers");
else if(HasRequestedWeaponDealer[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You have already requested a weapon dealer, please sit down and wait");
else
{
SendClientMessage(playerid, COLOR_GREEN, "You have requested a weapon dealer"); //Message to the player who have requesed weapon dealer
WeaponList(playerid);
HasRequestedWeaponDealer[playerid] = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_WEAPON_DEALER)
{
new string[128];
format(string, sizeof(string), "%s(%d) has requested a weapon dealer in %s", PlayerName(i), i, GetPlayerZone(i)); //Send the message to online Weapon Dealers
SendClientMessage(i, COLOR_GREEN, string);
ServerLog(string);
return 1;
}
}
return 1;
}
}
Код:
stock PlayerName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; }
i = Unknown123... ID 1 (Not weapon dealer)
he = Raphael... ID 0 (Waepon Dealer)
When i type /weapons then i get the message "You have requested...." (..Nothing wrong there)
But for the weapons dealer get "Raphael(1) has requested a weapon dealer in San Fierro"
But it should be "Unknown123(1) has requested a weapon dealer in San Fierro"