SA-MP Forums Archive
How Define? - 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: How Define? (/showthread.php?tid=406764)



How Define? - DAVIDXP - 11.01.2013

Hi all today i downloaded an GM and at this GM i musst work, and first i musst define these:
Quote:

public OnPlayerConnect( playerid )
{

new string[ 300 ], file[ 256 ];
new tmp3[ 50 ]; GetPlayerIp( playerid, tmp3, 50 );

for ( new i; i < MAX_PLAYERS; i++ )
if ( IsPlayerConnected( i ) && gNameTags[ i ] == 0 )
ShowPlayerNameTagForPlayer( i, playerid, 0 );

ramped[ playerid ] = 1;
GPSTimer[ playerid ] = 0;
Vup[ playerid ] = 0;
JumpSize[ playerid ] = 0;
VupKey[ playerid ] = 0;
Posaved[ playerid ] = 0;
firstspawn[ playerid ] = 1;
gNameTags[ playerid ] = 1;
InEvent[ playerid ] = 0;
InRRace[ playerid ] = 0;
IsRaceTextDrawActivated[ playerid ] = 0;
g_GotInvitedToDuel[ playerid ] = 0;
g_HasInvitedToDuel[ playerid ] = 0;
g_IsPlayerDueling[ playerid ] = 0;
ClickedPlayerID[ playerid ] = -1;
HaveGPS[ playerid ] = false;
PlayerInfo[ playerid ][ Deaths ] = 0;
PlayerInfo[ playerid ][ Kills ] = 0;
PlayerInfo[ playerid ][ Jailed ] = 0;
PlayerInfo[ playerid ][ Frozen ] = 0;
PlayerInfo[ playerid ][ Level ] = 0;
PlayerInfo[ playerid ][ pVip ] = 0;
PlayerInfo[ playerid ][ LoggedIn ] = 0;
PlayerInfo[ playerid ][ Registered ] = 0;
PlayerInfo[ playerid ][ God ] = 0;
PlayerInfo[ playerid ][ GodCar ] = 0;
PlayerInfo[ playerid ][ TimesSpawned ] = 0;
PlayerInfo[ playerid ][ Muted ] = 0;
PlayerInfo[ playerid ][ MuteWarnings ] = 0;
PlayerInfo[ playerid ][ Warnings ] = 0;
PlayerInfo[ playerid ][ Caps ] = 0;
PlayerInfo[ playerid ][ DoorsLocked ] = 0;
PlayerInfo[ playerid ][ pCar ] = -1;
for ( new i; i < PING_MAX_EXCEEDS; i++ ) PlayerInfo[ playerid ][ pPing ][ i ] = 0;
PlayerInfo[ playerid ][ SpamCount ] = 0;
PlayerInfo[ playerid ][ SpamTime ] = 0;
PlayerInfo[ playerid ][ PingCount ] = 0;
PlayerInfo[ playerid ][ PingTime ] = 0;
PlayerInfo[ playerid ][ FailLogin ] = 0;
PlayerInfo[ playerid ][ Coins ] = 0;
PlayerInfo[ playerid ][ DeathMatch ] = 0;
PlayerInfo[ playerid ][ RaceScore ] = 0;
PlayerInfo[ playerid ][ Rank ] = 0;
RecentlyRobbed[ playerid ] = 0;
PlayerInfo[ playerid ][ ConnectTime ] = gettime( );
SpawnInDM[ playerid ] = " ";
DM[ playerid ] = 0;
Reply[ playerid ] = 0;

TogglePlayerControllable( playerid, 0 );

Who Can Help me to define these?



Re: How Define? - DAVIDXP - 11.01.2013

Who can help?


Re: How Define? - JavoDiaz - 11.01.2013

pawn Код:
public OnPlayerConnect( playerid )
{
    new string[ 300 ], file[ 256 ];
    new tmp3[ 50 ]; GetPlayerIp( playerid, tmp3, 50 );

    for ( new i; i < MAX_PLAYERS; i++ )
    {
        if ( IsPlayerConnected( i ) && gNameTags[ i ] == 0 )
            ShowPlayerNameTagForPlayer( i, playerid, 0 );
    }
    ramped[ playerid ] = 1;
GPSTimer[ playerid ] = 0;
Vup[ playerid ] = 0;
JumpSize[ playerid ] = 0;
VupKey[ playerid ] = 0;
Posaved[ playerid ] = 0;
firstspawn[ playerid ] = 1;
gNameTags[ playerid ] = 1;
InEvent[ playerid ] = 0;
InRRace[ playerid ] = 0;
IsRaceTextDrawActivated[ playerid ] = 0;
g_GotInvitedToDuel[ playerid ] = 0;
g_HasInvitedToDuel[ playerid ] = 0;
g_IsPlayerDueling[ playerid ] = 0;
ClickedPlayerID[ playerid ] = -1;
HaveGPS[ playerid ] = false;
PlayerInfo[ playerid ][ Deaths ] = 0;
PlayerInfo[ playerid ][ Kills ] = 0;
PlayerInfo[ playerid ][ Jailed ] = 0;
PlayerInfo[ playerid ][ Frozen ] = 0;
PlayerInfo[ playerid ][ Level ] = 0;
PlayerInfo[ playerid ][ pVip ] = 0;
PlayerInfo[ playerid ][ LoggedIn ] = 0;
PlayerInfo[ playerid ][ Registered ] = 0;
PlayerInfo[ playerid ][ God ] = 0;
PlayerInfo[ playerid ][ GodCar ] = 0;
PlayerInfo[ playerid ][ TimesSpawned ] = 0;
PlayerInfo[ playerid ][ Muted ] = 0;
PlayerInfo[ playerid ][ MuteWarnings ] = 0;
PlayerInfo[ playerid ][ Warnings ] = 0;
PlayerInfo[ playerid ][ Caps ] = 0;
PlayerInfo[ playerid ][ DoorsLocked ] = 0;
PlayerInfo[ playerid ][ pCar ] = -1;
for ( new i; i < PING_MAX_EXCEEDS; i++ ) PlayerInfo[ playerid ][ pPing ][ i ] = 0;
PlayerInfo[ playerid ][ SpamCount ] = 0;
PlayerInfo[ playerid ][ SpamTime ] = 0;
PlayerInfo[ playerid ][ PingCount ] = 0;
PlayerInfo[ playerid ][ PingTime ] = 0;
PlayerInfo[ playerid ][ FailLogin ] = 0;
PlayerInfo[ playerid ][ Coins ] = 0;
PlayerInfo[ playerid ][ DeathMatch ] = 0;
PlayerInfo[ playerid ][ RaceScore ] = 0;
PlayerInfo[ playerid ][ Rank ] = 0;
RecentlyRobbed[ playerid ] = 0;
PlayerInfo[ playerid ][ ConnectTime ] = gettime( );
SpawnInDM[ playerid ] = " ";
DM[ playerid ] = 0;
Reply[ playerid ] = 0;
TogglePlayerControllable( playerid, 0 );
return 1;
}

I don't understand well what you want but I have repaired your code.