How do to my car rides ?
#1

Hello, I'm making a script to give to another player, my own car, but it doesn't. What is the problem ?

I'm sorry for my bad English.


Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new h;
new str[128],Float:Pos[3];
for(h = 1; h < MAX_EV; h++)
{
	if (IsValidDynamicPickup(EvIslem[h][evCikis]))
	{
	    for(new x = 1; x < _a@SL; x++)
		{
      		if(vehicleid == EvIslem[h][aracCount][x])
			{
      			if(strcmp(EvIslem[h][evSahip], getName(playerid), false) == 0 && anahtar[playerid] != 0)
				{
					SetPVarInt(playerid,"@_aID",x);
					_@slot[playerid] = x;
 				}
 				else
 				{
				GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
				SetPlayerPos(playerid,Pos[0],Pos[1]+0.01,Pos[2]);
				format(str,sizeof(str),"{32ED3E}[ARAЗ] {FFFFFF}Bu araз {5289FF}%s {FFFFFF}ait, Binmek iзin sahibinden anahtarları isteyin.",EvIslem[h][evSahip]);
				SendClientMessage(playerid,-1,str);
 				}
 			}
	    }
	}
}
	return 1;
}

CMD:anahtarver(playerid,params[])
{
new ID,str[128];
if(sscanf(params, "d", ID)) return SendClientMessage(playerid, -1, "{FFA600}Bilgi: {FFFFFF}/AnahtarVer [ID]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000FF, "HATA: Oyuncu oyunda değil!");
if(playerid == ID) return SendClientMessage(playerid, 0xFF0000FF, "HATA: Arabaların sahibi zaten sensin ?");
anahtar[ID] = 1;
format(str,sizeof(str),"{93FF54}[ANAHTAR] {FFFFFF}Evinizdeki araзların anahtarlarını {FFA600}%s(%d), verdiniz.",getName(ID),ID);
SendClientMessage(playerid,-1,str);
format(str,sizeof(str),"{93FF54}[ANAHTAR] {FFFFFF}Oyuncu {FFA600}%s(%d), {FFFFFF}size evindeki araзların anahtarlarını verdi.",getName(playerid),playerid);
SendClientMessage(ID,-1,str);
return 1;
}
Reply


Messages In This Thread
How do to my car rides ? - by sampkinq - 11.06.2016, 14:59

Forum Jump:


Users browsing this thread: 1 Guest(s)