21.10.2009, 09:56
Does GetPlayerWeaponData works now? Or is it still bugged?
if(strcmp(cmd, "/weapons", true) == 0) // Checks a player's weapons
{
LogPlayerCommand(playerid,1,cmdtext);
if(Account[playerid][Alevel] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /weapons [playerid]");
return 1;
}
new targetid = ReturnUser(tmp);
if (targetid != INVALID_PLAYER_ID)
{
new bullets[12];
new weapons[12];
new weapname[12][20];
for(new i = 0; i < 12; i++)
{
GetPlayerWeaponData(targetid, i+1, weapons[i], bullets[i]);
GetWeaponName(weapons[i], weapname[i], 20);
}
new giveplayername[MAX_PLAYER_NAME];
GetPlayerName(targetid, giveplayername, sizeof(giveplayername));
format(string,sizeof(string)," |- %s's Weapons -|",giveplayername);
SendClientMessage(playerid,LIME,string);
format(string, sizeof(string),"%s(0) - %s(%d) - %s(%d) - %s(%d) - %s(%d) - %s(%d)",weapname[0],weapname[1],bullets[1],weapname[2],bullets[2],weapname[3],bullets[3],weapname[4],bullets[4],weapname[5],bullets[5]);
SendClientMessage(playerid,YELLOW,string);
format(string,sizeof(string),"%s(%d) - %s(%d) - %s(%d) - %s(0) - %s(0) - %s(0)",weapname[6],bullets[6],weapname[7],bullets[7],weapname[8],bullets[8],weapname[9],weapname[10],weapname[11]);
SendClientMessage(playerid,YELLOW,string);
}
else SendClientMessage(playerid, CORAL,"Invalid ID");
}
else return 0;
return 1;
}
Originally Posted by Nick_name
Does GetPlayerWeaponData works now? Or is it still bugged?
|
Originally Posted by Don Correlli
Quote:
|
Originally Posted by MenaceX^
No, it has/had some bugs..
|
Originally Posted by Don Correlli
Hm, i never had any problems with it (except the little ammo bug when it returned 65535 instead of 1).
Quote:
|
Originally Posted by Y_Leѕѕ
Quote:
|
Originally Posted by Y_Leѕѕ
But did you test it on 0.3?
|