Рекомендованные сообщения



2 posts in this topic

Помогите сделать систему, что бы новогодняя шапка давалась сразу при входе.

Share this post


Link to post
Share on other sites

ко всем new

new shapka[MAX_PLAYERS];

В OnPlayerConnect

 

shapka[playerid] = 0;

 

в OnPlayerSpawn

if(IsPlayerConnected(playerid)){
    if(shapka[playerid] != 1){ //Если шапка не надета
        for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++){ //ищем свободный слот
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)){//Если слот свободен
                SetPlayerAttachedObject(playerid,i, 19064, 2, 0.13, 0.0, 0.0, 0.0, 90.0, 90.0);//Надеваем шапку
                shapka[playerid] = 1; //Запишем в переменную что игрок одел шапку
                break;//Останавливаем цикл
            }
        }
    }
}

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Guest володя
      By Guest володя
      C:\Users\vilin\Desktop\Hot RP\gamemodes\hot.pwn(67) : warning 215: expression has no effect
      C:\Users\vilin\Desktop\Hot RP\gamemodes\hot.pwn(114 -- 121) : error 001: expected token: "-string end-", but found "-identifier-"
      C:\Users\vilin\Desktop\Hot RP\gamemodes\hot.pwn(121) : warning 217: loose indentation
      C:\Users\vilin\Desktop\Hot RP\gamemodes\hot.pwn(121) : warning 215: expression has no effect
      C:\Users\vilin\Desktop\Hot RP\gamemodes\hot.pwn(121 -- 124) : warning 215: expression has no effect
      Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

      1 Error.
      Вот код: