Little script bug - 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: Little script bug (
/showthread.php?tid=593181)
Little script bug -
Karolukas123 - 02.11.2015
why i dont get message when i press + and car is locked ( player car )..
Код:
}
if(PRESSED(KEY_SUBMISSION))
{
new vehicleid = GetPlayerVehicleID(playerid), String[125];
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(vehicleid) == 525)
{
new Float:aPos[3];
for(new v = 0; v < MAX_VEHICLES; v++)
{
if(GetVehicleModel(v) < 400 || v == vehicleid) continue;
GetVehiclePos(v, aPos[0], aPos[1], aPos[2]);
if(IsPlayerInRangeOfPoint(playerid, 10.0, aPos[0], aPos[1], aPos[2]))
{
AttachTrailerToVehicle(v, vehicleid);
}
if(vehicleDB[vehicleid][vLocked])
{
if(strcmp(GetPlayerNameEx(playerid), vehicleDB[vehicleid][vOwner], true))
{
format(String, sizeof(String),"Its %s player car. You need bring it to base",vehicleDB[vehicleid][vOwner]);
SendClientMessage(playerid, -1, String);
return 0;
Re: Little script bug -
SkinnyF - 02.11.2015
Well i did little bit differently. I made that every car messages would be in
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
But you can put your code there i don't see any problem with that.
Re: Little script bug -
Karolukas123 - 02.11.2015
ee mate i do it.. for check if car locked so send message.. but i need if i use towtruck and press + and attach car.. i get message what car, and i need get car owner