GetPlayerWeaponData [SOLVED]
#1

How can I send a message with the weapon data of a player after using GetPlayerWeaponData?
Reply
#2

Quote:
Originally Posted by Sascha
How can I send a message with the weapon data of a player after using GetPlayerWeaponData?
Example:
pawn Код:
new string[128];
new wep, ammo;
GetPlayerWeaponData(playerid, slot, wep, ammo);
format(string, sizeof(string), "%d",wep);
SendClientMessageToAll(COLOR,string);
If you need any help with this code, post it here as a comment.
Reply
#3

i got that:
Код:
new msg[256];
new weapons[13][2];
for(new w = 0; w < 13; w++)
GetPlayerWeaponData(pid, w, weapons[w][0], weapons[w][1]);
format(msg, sizeof(msg), "Result: Weapon: %d", weapons[w][0]);
SendClientMessage(playerid, RED, msg);
and get "error 017: undefined symbol "w""...
the line is the "format(msg...." line
Reply
#4

pawn Код:
new msg[256];
new weapons[13][2];

for(new w = 0; w < 13; w++)
{
GetPlayerWeaponData(pid, w, weapons[w][0], weapons[w][1]);
format(msg, sizeof(msg), "Result: Weapon: %d", weapons[w][0]);
SendClientMessage(playerid, RED, msg);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)