SA-MP Forums Archive
Command [+REP] - 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: Command [+REP] (/showthread.php?tid=560629)



Command [+REP] - norton2 - 29.01.2015

I ordered " / towveh " for the dealership , and when you have a personal car with help from the command " / towveh " to respawn ! But it does not work , I do not respawn car!
Explain the functions: VehiclesInfo[v][vOwner] => ID player from database
PlayerInfo[playerid][pID] => ID player from database

Код HTML:
CMD:towveh(playerid, params[])
{
	for(new v = 0; v < MAX_VEHICLES; v++)
	{
		if(VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID])
		{
			SetVehicleToRespawn(v);
	 	}
	 	return 1;
	}
	return 1;
}



Re: Command [+REP] - Sime30 - 29.01.2015

pawn Код:
CMD:towveh(playerid, params[])
{
    for(new v = 0; v < MAX_VEHICLES; v++)
    {
        if(VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID])
        {
            SetVehicleToRespawn(v);
                        return 1;
        }
       
    }
    return 1;
}



Re: Command [+REP] - norton2 - 29.01.2015

the does n't work
not working


Re: Command [+REP] - Nicker - 29.01.2015

////


Re: Command [+REP] - HydraHumza - 29.01.2015

PHP код:
CMD:towveh(playeridparams[])
{
    for(new 
0MAX_VEHICLESv++)
    {
        if(
VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID])
        {
            
SetVehicleToRespawn(v);
         }
    }
    return 
1;
}
Try 
this 



Re: Command [+REP] - norton2 - 29.01.2015

@Humza:
LOG:
Код HTML:
[10:39:33] [debug] #0 0006b0d0 in public cmd_towveh (playerid=0, params[]=@001df928 "") at C:\Users\Bruker\Desktop\UG GM\gamemodes\w3op.pwn:6766
[10:39:33] [debug] #1 native CallLocalFunction () from samp-server.exe
[10:39:33] [debug] #2 0000cff0 in public OnPlayerCommandText (playerid=0, cmdtext[]=@001df908 "/towveh") at C:\Users\Bruker\Desktop\UG GM\pawno\include\zcmd.inc:102
Line:
Код HTML:
if(VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID])
The function " SetVehicleToRespawn " works correctly !


Re: Command [+REP] - HydraHumza - 29.01.2015

Quote:
Originally Posted by norton2
Посмотреть сообщение
@Humza:
LOG:
Код HTML:
[10:39:33] [debug] #0 0006b0d0 in public cmd_towveh (playerid=0, params[]=@001df928 "") at C:\Users\Bruker\Desktop\UG GM\gamemodes\w3op.pwn:6766
[10:39:33] [debug] #1 native CallLocalFunction () from samp-server.exe
[10:39:33] [debug] #2 0000cff0 in public OnPlayerCommandText (playerid=0, cmdtext[]=@001df908 "/towveh") at C:\Users\Bruker\Desktop\UG GM\pawno\include\zcmd.inc:102
Line:
Код HTML:
if(VehiclesInfo[v][vOwner] == PlayerInfo[playerid][pID])
The function " SetVehicleToRespawn " works correctly !
if SetVehicleToRespawn working fine then where u getting error?


Re: Command [+REP] - norton2 - 29.01.2015

when "SetVehicleToRespawn " works , not getting Error


Re: Command [+REP] - HydraHumza - 29.01.2015

Quote:
Originally Posted by norton2
Посмотреть сообщение
when "SetVehicleToRespawn " works , not getting Error
So what u want now?


Re: Command [+REP] - norton2 - 29.01.2015

As my car to respawn !