buying a radio - 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)
+--- Thread: buying a radio (
/showthread.php?tid=288715)
buying a radio -
Dripac - 08.10.2011
Код:
CMD:radio(playerid)
{
if(PlayerInfo[playerid][pRadio] > 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid,14147,DIALOG_STYLE_LIST,"{B89200}Wдhle einen Song aus den du dir anhцren willst:",songstr,"Einschalten","Ausschalten");
}
else
{
SendClientMessage(playerid,0xF40B74FF,"Du kannst nur im Fahrzeug den Radio verwenden!");
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Du hast keinen Radio!");
}
return 1;
}
That's what i got for now, the only thing i need is a command /buyradio, and then it will save in the users file "(PlayerInfo[playerid][pRadio] > 1)". And if a player already got a radio he can't Buy it again. Only if player is in this range of point 1211.3070,-916.5763,43.0241
I can script that myself, but it will take me 1 hour to do it and i am tired right now