stock GetVehicleDescompilerValue(playerid, pvInfo: enum_tt, text[], type) { new string[MAX_PLAYERVEHICLES][40], i; explode(string, text, ","); while(i < MAX_PLAYERVEHICLES) { if(strcmp(string[i], "", true) != 0) { switch(type) { case 'i','d': PlayerVehicleInfo[playerid][i][enum_tt] = strval(string[i]); // =============> case 'f': PlayerVehicleInfo[playerid][i][enum_tt] = floatstr(string[i]); // TAG MISMATCH case 's': format(PlayerVehicleInfo[playerid][i][enum_tt], MAX_PLAYER_NAME, "%s", string[i]); } } else {break;} i++; } }
main()
{
Function(0, "f", "2.5");
}
enum eArray
{
Float:array_float
};
new aArray[MAX_PLAYERS][eArray];
stock Function(playerid, specifier[], value[])
{
switch(specifier[0])
{
case 'f':
{
aArray[playerid][array_float] = floatstr(value);
}
}
return 1;
}
main()
{
Function(0, "f", "2.5");
}
enum eArray
{
array_float
};
new aArray[MAX_PLAYERS][eArray];
stock Function(playerid, specifier[], value[])
{
switch(specifier[0])
{
case 'f':
{
aArray[playerid][array_float] = _:floatstr(value);
}
}
return 1;
}
enum pvInfo { Float:pvPosX, Float:pvPosY, Float:pvPosZ, Float:pvPosAngle, pvVW, pvId, pvModelId, pvLock, pvLocked, pvPaintJob, pvColor1, pvColor2, pvMods[MAX_MODS], pvAllowPlayer[MAX_PLAYER_NAME], pvAllowedPlayerId, pvPark, pvStereo, //pvNumberPlate[32], // sz pvPrice, pvTicket, pvWeapons[3], pvMunicion[3], pvImpounded, pvFuel, Float:pvHealth, pvSpawned };
gracias, me funciono simplemente quitandole el tag al floatstr, pero otra pregunta, їDespuйs de hacer eso no tengo que despuйs usar Float para que sea compatible?
|