Need help :)
#1

Hey. I'm making a "player information" command. It looks like this:

Код:
format(string, sizeof(string),"Interior: %d - Virtual World: %d - Position X: %0.1f - Y: %0.1f - Z: %0.1f", GetPlayerInterior(playerid2), GetPlayerVirtualWorld(playerid2), Float:X,Float:Y,Float:Z);
SendClientMessage(playerid,yellow,string);
I would like to add to see is player having speedboost on. Can anyone add that thing to this? (if enabled - 1: say "enabled", if disabled - "disabled"). I use speedboost[playerid]; For that, please make after "Z: %0.1f".

Thanks

PS: Adding car jumping, flying, ramp on will be easier to add then (I don't know how to add now) It can be really helpful in future scripts.
Reply
#2

I hope you get the idea, because you'll need to edit.
pawn Код:
if(speedboost[playerid2] == 1)
{
    format(string, sizeof(string),"Interior: %d - Virtual World: %d - Position X: %0.1f - Y: %0.1f - Z: %0.1f - SpeedBoost: Enabled", GetPlayerInterior(playerid2), GetPlayerVirtualWorld(playerid2), Float:X,Float:Y,Float:Z);
    SendClientMessage(playerid,yellow,string);
    return 1;
}
else
{
    format(string, sizeof(string),"Interior: %d - Virtual World: %d - Position X: %0.1f - Y: %0.1f - Z: %0.1f - SpeedBoost: Disabled", GetPlayerInterior(playerid2), GetPlayerVirtualWorld(playerid2), Float:X,Float:Y,Float:Z);
    SendClientMessage(playerid,yellow,string);
    return 1;
}
Reply
#3

Hmm, thanks But what if I would add ramp[playerid2], carjump[playerid2] and other in one line? That would take so much place...
Reply
#4

If you made the format line you should know how to add up ramp[playerid2], the only reason I made if and else is because you said you wanted 'Enabled' and 'Disabled' instead of 1 or 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)