OnPlayerConnect[rep]
#1

Hi i made an thing so if a player enters my server i see his name..but i get 26 errors..

PHP код:
   new string[256];
               new 
plname[MAX_PLAYER_NAME];
                        
format(string,sizeof(string), " %s a intrat in Server! ",plname); 
Reply
#2

Show the code above the part you posed. Seems like you missed a bracket.
Reply
#3

What are the errors?
Reply
#4

the 26 errors have nothing to do with cmd..if i take out cmd then i get no errors..

PHP код:
public OnPlayerConnect(playerid)
                        {
                        
SetPlayerMapIcon(playerid41528.779, -1678.1135.89062530COLOR_YELLOW);  // Lspd
                        
SetPlayerMapIcon(playerid51219.4878,-1812.7175,16.593855COLOR_YELLOW);  // DMV
                        
SetPlayerMapIcon(playerid41462.5778,-1013.2362,26.843852COLOR_YELLOW);  // Bank
                        
SetPlayerMapIcon(playerid61178.03, -1323.4114.1022COLOR_YELLOW);  // Hospital
                        
SetPlayerMapIcon(playerid61412.9586,-1699.2380,13.539556COLOR_YELLOW); //jp
                        //so the timer can be executed again
                        
PlayAudioStreamForPlayerplayerid"http://77.36.67.131:8000/" );
                        
firstSpawnplayerid ] = true;
                        new 
zone[MAX_ZONE_NAME];
                        new 
string[256];
                        new 
plname[MAX_PLAYER_NAME];
                        
format(string,sizeof(string), " %d a intrat in Server! ",plname);
                        
SendClientMessage(COLOR_WHITEstring);"); 
Reply
#5

Do this:
pawn Код:
public OnPlayerConnect(playerid)
                        {
                        SetPlayerMapIcon(playerid, 4, 1528.779, -1678.113, 5.890625, 30, COLOR_YELLOW);  // Lspd
                        SetPlayerMapIcon(playerid, 5, 1219.4878,-1812.7175,16.5938, 55, COLOR_YELLOW);  // DMV
                        SetPlayerMapIcon(playerid, 4, 1462.5778,-1013.2362,26.8438, 52, COLOR_YELLOW);  // Bank
                        SetPlayerMapIcon(playerid, 6, 1178.03, -1323.41, 14.10, 22, COLOR_YELLOW);  // Hospital
                        SetPlayerMapIcon(playerid, 6, 1412.9586,-1699.2380,13.5395, 56, COLOR_YELLOW); //jp
                        //so the timer can be executed again
                        PlayAudioStreamForPlayer( playerid, "http://77.36.67.131:8000/" );
                        firstSpawn[ playerid ] = true;
                        new zone[MAX_ZONE_NAME];
                        new string[256];
                        new plname[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, plname, 24);
                        format(string,sizeof(string), " %d a intrat in Server! ",plname);
                        SendClientMessage(COLOR_WHITE, string);
                        return 1;
                        }
Reply
#6

Quote:
Originally Posted by FiReAlEx
Посмотреть сообщение
Do this:
PHP код:
public OnPlayerConnect(playerid
                        { 
                        
SetPlayerMapIcon(playerid41528.779, -1678.1135.89062530COLOR_YELLOW);  // Lspd 
                        
SetPlayerMapIcon(playerid51219.4878,-1812.7175,16.593855COLOR_YELLOW);  // DMV 
                        
SetPlayerMapIcon(playerid41462.5778,-1013.2362,26.843852COLOR_YELLOW);  // Bank 
                        
SetPlayerMapIcon(playerid61178.03, -1323.4114.1022COLOR_YELLOW);  // Hospital 
                        
SetPlayerMapIcon(playerid61412.9586,-1699.2380,13.539556COLOR_YELLOW); //jp 
                        //so the timer can be executed again 
                        
PlayAudioStreamForPlayerplayerid"http://77.36.67.131:8000/" ); 
                        
firstSpawnplayerid ] = true
                        new 
zone[MAX_ZONE_NAME]; 
                        new 
string[256]; 
                        new 
plname[MAX_PLAYER_NAME]; 
                        
format(string,sizeof(string), " %d a intrat in Server! ",plname); 
                        
SendClientMessage(COLOR_WHITEstring);"); 
                        return 1;
                        } 
no work.. pawno stops responding
Reply
#7

EDIT, read now.
Reply
#8

pawn Код:
public OnPlayerConnect(playerid)  
{  
    new name[MAX_PLAYER_NAME], string[47];  
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), " %s a intrat in Server! ", name);  
    SendClientMessage(playerid, COLOR_WHITE, string);
   
    //Rest of OnPlayerConnect goes under here
    return true;
}
Reply
#9

look..

PHP код:
public OnPlayerConnect(playerid)
                        {
                        
SetPlayerMapIcon(playerid41528.779, -1678.1135.89062530COLOR_YELLOW);  // Lspd
                        
SetPlayerMapIcon(playerid51219.4878,-1812.7175,16.593855COLOR_YELLOW);  // DMV
                        
SetPlayerMapIcon(playerid41462.5778,-1013.2362,26.843852COLOR_YELLOW);  // Bank
                        
SetPlayerMapIcon(playerid61178.03, -1323.4114.1022COLOR_YELLOW);  // Hospital
                        
SetPlayerMapIcon(playerid61412.9586,-1699.2380,13.539556COLOR_YELLOW); //jp
                        //so the timer can be executed again
                        
PlayAudioStreamForPlayerplayerid"http://77.36.67.131:8000/" );
                        
firstSpawnplayerid ] = true;
                        new 
zone[MAX_ZONE_NAME];
                        new 
name[MAX_PLAYER_NAME],string[47];
                        
GetPlayerName(playeridnamesizeof(name));
                        
format(stringsizeof(string), " %s a intrat in Server! "name);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
GetPlayer2DZone(playeridzoneMAX_ZONE_NAME);
                        
PlayerInfo[playerid][SpawnDance] = true;
                        
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //preventing a bug for the animation not being applied the first time OnPlayerRequestClass is called
                        
if(Security != 0)
                        {
                        
SendClientMessage(playeridCOLOR_YELLOW"Host has broken one of the Agreement rules, action has been taken.");
                        
Kick(playerid);
                        return 
true;
                        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)