SA-MP Forums Archive
RC Shop Script Error I made it - 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: RC Shop Script Error I made it (/showthread.php?tid=287318)



RC Shop Script Error I made it - Jason_Thunde - 02.10.2011

Hey guys im having some probs with my SAMP Script RC Shop Its the Command /exitrc When i do it In Game it Dosent work Idk whats wrong Here is script.

Код:
if(strcmp(cmd, "/exitrc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		new playername[MAX_PLAYER_NAME];
	            new string2[128];
	            new string3[128];
	            new string4[128];
                GetPlayerName(playerid, playername, sizeof(playername));
                format(string, sizeof(string), "%src1.txt", playername);
                format(string2, sizeof(string2), "%src2.txt", playername);
                format(string3, sizeof(string3), "%src3.txt", playername);
                format(string4, sizeof(string4), "%src4.txt", playername);
	            if(dini_Exists(string) || dini_Exists(string2)|| dini_Exists(string3) || dini_Exists(string4))
		   	 {
 			            
			if(IsPlayerInVehicle(playerid, 464))
			{
			    RemovePlayerFromVehicle(playerid);
			    DestroyVehicle(464);
			    SendClientMessage(playerid, COLOR_YELLOW, "Your have succesfully Picked up your RC Vehicle");
			}
			else if(IsPlayerInVehicle(playerid, 441))
			{
				RemovePlayerFromVehicle(playerid);
				DestroyVehicle(441);
				SendClientMessage(playerid, COLOR_YELLOW, "Your have succesfully Picked up your RC Vehicle");
			}
			else if(IsPlayerInVehicle(playerid, 564))
			{
				RemovePlayerFromVehicle(playerid);
				DestroyVehicle(564);
				SendClientMessage(playerid, COLOR_YELLOW, "Your have succesfully Picked up your RC Vehicle");
			}
			else if(IsPlayerInVehicle(playerid, 501))
			{
                RemovePlayerFromVehicle(playerid);
				DestroyVehicle(501);
				SendClientMessage(playerid, COLOR_YELLOW, "Your have succesfully Picked up your RC Vehicle");
			}
 			        
 			   }
 			   else
 			   SendClientMessage(playerid, COLOR_GREY, "You dont own a RC Vehicle Buy one from the Shop near Airport");
	    }
	return 1;
	}



Re: RC Shop Script Error I made it - Jefff - 02.10.2011

Vehicleid is not Modelid


Re: RC Shop Script Error I made it - Jason_Thunde - 03.10.2011

DestroyVehicle(vehicleid);

Dintent work