[Pomoc] /pojas


Započeo loc, Decembar 27, 2013, 18:48:53 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

loc

*

Skripta koju koristim: Moju od 0
Detaljan opis problema: Neznam kako da napravim /pojas i da pise kao /me stavlja pojas | /me odvezuje pojas !
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Orion Gaming
,
www.og-rp.info

SA-MP IP: uskoro
TS3 IP: uskoro

new Pojas[MAX_PLAYERS];


    if (strcmp("/pojas", cmdtext, true, 10) == 0)
    {
      if(IsPlayerInAnyVehicle(playerid))
      {
        if(IsPlayerConnected(playerid))
        {
           if(Pojas[playerid] == 0)
            {
             GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s uzima svoj pojas te se veze.", sendername);
             ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
             Pojas[playerid] = 1;
             return 1;
            }
           else
           {
             GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s skida svoj pojas.", sendername);
             ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
             Pojas[playerid] = 0;
             return 1;
               }
           }
       }
      return 1;
    }


pod OnPlayerExitVehicle

if(Pojas[playerid] == 1)
	{
		new pName[24];
		new string[128];
		GetPlayerName(playerid, pName, 24);
		format(string, 128, "* %s skida svoj pojas.", pName);
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		Pojas[playerid] = 0;
		return 1;
	}


i to je to

loc

*

Citat: Mangusta poslato Decembar 27, 2013, 19:44:15 POSLE PODNE
new Pojas[MAX_PLAYERS];


    if (strcmp("/pojas", cmdtext, true, 10) == 0)
    {
      if(IsPlayerInAnyVehicle(playerid))
      {
        if(IsPlayerConnected(playerid))
        {
           if(Pojas[playerid] == 0)
            {
             GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s uzima svoj pojas te se veze.", sendername);
             ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
             Pojas[playerid] = 1;
             return 1;
            }
           else
           {
             GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s skida svoj pojas.", sendername);
             ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
             Pojas[playerid] = 0;
             return 1;
               }
           }
       }
      return 1;
    }


pod OnPlayerExitVehicle

if(Pojas[playerid] == 1)
	{
		new pName[24];
		new string[128];
		GetPlayerName(playerid, pName, 24);
		format(string, 128, "* %s skida svoj pojas.", pName);
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		Pojas[playerid] = 0;
		return 1;
	}


i to je to

Thx ;)
Orion Gaming
,
www.og-rp.info

SA-MP IP: uskoro
TS3 IP: uskoro

i sad kad si to napravio bilo bi dobro da kad igrac udje u auto da mu pise stavite pojas da vas policija nebi kaznila i za saobracajnu policiju komandu /checkpojas ili tako nesto :)