SA-MP Forums Archive
Need Help for OwnerShip - 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: Need Help for OwnerShip (/showthread.php?tid=389655)



Need Help for OwnerShip - imnoob - 02.11.2012

Can some1 explain me how to make when player press F or ENTER near the car to give him OWNER: JASSON SMITH in GREEN (OWNER) like on the picture http://www.zaslike.com/viewer.php?fi...aus10wu9ax.png
Код:
GameTextForPlayer(playerid, ~g~OWNER~w~ %s, 3000, 3, GetVehicleNameFromID(veh), owner);
can i do something like this ?


Re: Need Help for OwnerShip - thefatshizms - 03.11.2012

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    new owner[128];
    new name[24];
    GetPlayerName(playerid, name, 24);
    format(owner, sizeof(owner), "~g~Owner:~w~ %s", name);
    GameTextForPlayer(playerid, owner, 2000, 0);
    return 1;
}



Re: Need Help for OwnerShip - Lorrden - 03.11.2012

pawn Код:
OnPlayerEnterVehicle(playerid, vehicleid)
{
if(vehicleid == YOURVEHICLEID)
{
GameTextForPlayer(playerid, "~g~Owner: ~w~Jason Smith", 2000, 3);
}
return true;
}