Need help :) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help :) (
/showthread.php?tid=229940)
Need help :) -
Libra_PL - 22.02.2011
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.
Re: Need help :) -
maramizo - 22.02.2011
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;
}
Re: Need help :) -
Libra_PL - 22.02.2011
Hmm, thanks

But what if I would add ramp[playerid2], carjump[playerid2] and other in one line? That would take so much place...
Re: Need help :) -
maramizo - 22.02.2011
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.