SA-MP Forums Archive
pls.. 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)
+--- Thread: pls.. Help... (/showthread.php?tid=647602)



pls.. Help... - Longover - 07.01.2018

I'm have a command on you can see your vehicles,but not working...
I'm see all vehicles of the server,why?
Код:
if(strcmp(cmd, "/mycars", true) == 0)
	{
	if(AccountInfo[playerid][Vehicule] == 0) return SCM(playerid, ERROR, "Nu ai nici-un vehicul !");
	for(new i=1;i<buyablecars;i++)
		{
		if(strcmp(VehInfo[i][Propietar], name, true) == 0)
	    	{
	    	    new string[MAX_STRING];
			 	GetVehicleName(i);
			 	format(string,sizeof(string), "Model-> %s, ID: %d, Kilometrii: %.1f",VehicleNames[GetVehicleModel(i)-400],VehInfo[i][Model], VehInfo[i][Km]);
				SCM(playerid,COLOR_YELLOW,string);
				format(string,sizeof(string), "Vehicule: %d | Sloturi pentru vehicule: %d", AccountInfo[playerid][Vehicule], AccountInfo[playerid][MaxVeh]);
				SCM(playerid,COLOR_YELLOW,string);
			}
		else if(VehInfo[i][Km] <= 0)
		{
		return GivePlayerMoney(playerid, 0);
		}
		}
	return 1;
	}
Thanks!


Re: pls.. Help... - solstice_ - 07.01.2018

Please try to explain it more, i can't really understand anything.


Re: pls.. Help... - Longover - 07.01.2018

Quote:
Originally Posted by willbedie
Посмотреть сообщение
Please try to explain it more, i can't really understand anything.
When i'm type /mycars,The server send message to me: Server:Unknown command..
even if command is implemented...
[P.S:Sorry for my bad english...]


Re: pls.. Help... - RogueDrifter - 07.01.2018

If you have #include ZCMD on top of your script then change
PHP код:
public OnPlayerCommandText(playeridcmdtext[]) 
To
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success



Re: pls.. Help... - Longover - 07.01.2018

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
If you have #include ZCMD on top of your script then change
PHP код:
public OnPlayerCommandText(playeridcmdtext[]) 
To
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success
I'm have dcmd.