Pular para o conteúdo principal

GetPlayerClass

atenção

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Get the class data.

NameDescription
classidThe class id to get data from.
&teamA variable in which to store the team in, passed by reference.
&skinA variable in which to store the skin in, passed by reference.
&Float:spawnXA float variable in which to store the X coordinate in, passed by reference.
&Float:spawnYA float variable in which to store the Y coordinate in, passed by reference.
&Float:spawnZA float variable in which to store the Z coordinate in, passed by reference.
&Float:angleA float variable in which to store the angle coordinate in, passed by reference.
&WEAPON:weapon1A variable in which to store the weapon1 in, passed by reference.
&ammo1A variable in which to store the ammo1 in, passed by reference.
&WEAPON:weapon2A variable in which to store the weapon2 in, passed by reference.
&ammo2A variable in which to store the ammo2 in, passed by reference.
&WEAPON:weapon3A variable in which to store the weapon3 in, passed by reference.
&ammo3A variable in which to store the ammo3 in, passed by reference.

Examples

new
classid = 10,
team,
skin,
Float:spawnX,
Float:spawnY,
Float:spawnZ,
Float:angle,
WEAPON:weapon1,
ammo1,
WEAPON:weapon2,
ammo2,
WEAPON:weapon3,
ammo3;

GetPlayerClass(classid, team, skin, spawnX, spawnY, spawnZ, angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3);

printf("[Class id %d data]\n\
team: %d\n\
skin: %d\n\
spawnX: %f\n\
spawnY: %f\n\
spawnZ: %f\n\
angle: %f\n\
weapon1: %d\n\
ammo1: %d\n\
weapon2: %d\n\
ammo2: %d\n\
weapon3: %d\n\
ammo3: %d",
classid, team, skin, spawnX, spawnY, spawnZ, angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3);