SpriTe_ Posted April 26, 2013 Posted April 26, 2013 Salut SA-MP, am o linie care trebuie sa o definesc, dar nici prin cap nici prin minte nu gasesc o solutie cum fac asta:[pawn]error 017: undefined symbol "SendLogClient"[/pawn]Linia:[pawn]else return SendLogClient( playerid );[/pawn]Si daca aveti nevoie va dau scriptu intreg:[pawn]CMD:afk( playerid, params[ ] ){ if ( PlayerInfo[ playerid ][ LoggedIn ] == 1 ) { if ( afktime[ playerid ] == 1 ) { Game3TextForPlayer( playerid, "~y~You have recently been ~r~AFK, ~y~and cannot use ~r~/AFK ~y~for 2 minutes."); } if ( afktime[ playerid ] == 0 ) { if ( isafk[ playerid ] == 1 ) { Game3TextForPlayer( playerid, "~r~ERROR!: ~y~You are already in AFK mode!" ); } if ( isafk[ playerid ] == 0 ) { new afk[ 256 ], Float:x,Float:y,Float:z; format( afk, sizeof( afk ), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~r~ %s ~w~ is now ~g~AFK.", PlayerName( playerid ) ); GameTextForAll( afk, 4000, 3 ); TogglePlayerControllable( playerid, 0 ); SetPlayerVirtualWorld( playerid, ( playerid + 1 ) ); isafk[ playerid ] = 1; afktime[ playerid ] = 1; GetPlayerPos( playerid, x, y, z ); SetPVarFloat( playerid, "X", x ); SetPVarFloat( playerid, "Y", y ); SetPVarFloat( playerid, "Z", z ); if ( Posaved[ playerid ] == 0 ) { Posaved[ playerid ] = 1; } SetTimerEx( "playerafk", 1000*60*2, false, "b", playerid ); SetPlayerName( playerid, PlayerName( playerid ) ); } } } else return SendLogClient( playerid ); //Aici e linia. return 1;}[/pawn]Ajutati-ma va rog, cum sa defines?
burnfire Posted April 26, 2013 Posted April 26, 2013 Pune la inceputul scriptului [pawn]new SendLogClient[MAX_PLAYERS];[/pawn]
RaZVaN ^ xD Posted April 26, 2013 Posted April 26, 2013 Pune la inceputul scriptului [pawn]new SendLogClient[MAX_PLAYERS];[/pawn]In niciun caz. SendLogClient e o functie pe care ai uitat sa o copiezi din locul de unde ai copiat acea comanda. Y!M: [email protected] ( nu este ID pt. help-center )
SpriTe_ Posted April 27, 2013 Author Posted April 27, 2013 In niciun caz. SendLogClient e o functie pe care ai uitat sa o copiezi din locul de unde ai copiat acea comanda.pAI, n-am functia, acesta e un GM care acum il rezolv de toate problemele...Am cautat si pe net functia .. ceva de genu asta trebuie sa fie asai:[pawn]function SendLogClient(playerid, .................[/pawn]N-ai cumva asa functie?
Diabolik Posted April 27, 2013 Posted April 27, 2013 Incearca asa:forward SendLogClient(color, string[]); public SendLogClient(color, string[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >= 1) { SendClientMessage(i, color, string); } } } } Inloc de if(PlayerInfo[pAdmin] >= 1) pui fuctia la care iti trebuie comanda. LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP
[Funky]Anakin Posted May 1, 2013 Posted May 1, 2013 E comanda din RAS Cred ....Si stiu ca avea un stock sau functie numai stiu care salva intr-un fisier .txt / .ini , ca un logIncearca sa faci dupa modelul asta [pawn]stock SaveToFile( filename[], text[] ){ new File:rStuntFile, filepath[256], string[256], year, month, day, hour, minute, second; getdate( year, month, day ); gettime( hour, minute, second ); format( filepath, sizeof filepath ,"/Logs/%s.txt",filename); rStuntFile = fopen( filepath,io_append); format( string, sizeof string,"[ %d.%d.%d %d:%d:%d ] %s \r\n", day, month, year, hour, minute, second, text ); fwrite( rStuntFile,string); fclose( rStuntFile); return 1;}[/pawn]Daca nu sterge SendLogClient si daca da vreo eroare zi-ne
Question
SpriTe_
Salut SA-MP, am o linie care trebuie sa o definesc, dar nici prin cap nici prin minte nu gasesc o solutie cum fac asta:
[pawn]
error 017: undefined symbol "SendLogClient"
[/pawn]
Linia:
[pawn]
else return SendLogClient( playerid );
[/pawn]
Si daca aveti nevoie va dau scriptu intreg:
[pawn]
CMD:afk( playerid, params[ ] )
{
if ( PlayerInfo[ playerid ][ LoggedIn ] == 1 )
{
if ( afktime[ playerid ] == 1 )
{
Game3TextForPlayer( playerid, "~y~You have recently been ~r~AFK, ~y~and cannot use ~r~/AFK ~y~for 2 minutes.");
}
if ( afktime[ playerid ] == 0 )
{
if ( isafk[ playerid ] == 1 )
{
Game3TextForPlayer( playerid, "~r~ERROR!: ~y~You are already in AFK mode!" );
}
if ( isafk[ playerid ] == 0 )
{
new afk[ 256 ], Float:x,Float:y,Float:z;
format( afk, sizeof( afk ), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~r~ %s ~w~ is now ~g~AFK.", PlayerName( playerid ) );
GameTextForAll( afk, 4000, 3 );
TogglePlayerControllable( playerid, 0 );
SetPlayerVirtualWorld( playerid, ( playerid + 1 ) );
isafk[ playerid ] = 1;
afktime[ playerid ] = 1;
GetPlayerPos( playerid, x, y, z );
SetPVarFloat( playerid, "X", x );
SetPVarFloat( playerid, "Y", y );
SetPVarFloat( playerid, "Z", z );
if ( Posaved[ playerid ] == 0 )
{
Posaved[ playerid ] = 1;
}
SetTimerEx( "playerafk", 1000*60*2, false, "b", playerid );
SetPlayerName( playerid, PlayerName( playerid ) );
}
}
}
else return SendLogClient( playerid ); //Aici e linia.
return 1;
}
[/pawn]
Ajutati-ma va rog, cum sa defines?
5 answers to this question
Recommended Posts