SA-MP Forums Archive
teleport cmd with SSCANF. - 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: teleport cmd with SSCANF. (/showthread.php?tid=625400)



teleport cmd with SSCANF. - aymane123 - 01.01.2017

What Wrong ??
Код:
COMMAND:admina(playerid, params[])
{
	if(!adminLevel(playerid, 3))
	{	return 0;
	
                     new message[128];  //line 95
		changeAlog(playerid, "Use /admina command.");   //line 96
		format(message, sizeof(message), "You have been teleported to Admins Area !!");
		SetPlayerPos(playerid,  295.82523, -1797.97803, 4.54306);
		Server(playerid, message);
	}
	return 1;
}
Erors:
Код:
C:\Documents and Settings\Administrateur\Bureau\CZ\pawno\include\cnr/admin.inc(95) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\CZ\pawno\include\cnr/admin.inc(95) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\CZ\pawno\include\cnr/admin.inc(96) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.



Re: teleport cmd with SSCANF. - RyderX - 01.01.2017

PHP код:
COMMAND:admina(playeridparams[])
{
    if(!
adminLevel(playerid3))
    {
    return 
0;

        new 
message[128];  //line 95
        
changeAlog(playerid"Use /admina command.");   //line 96
        
format(messagesizeof(message), "You have been teleported to Admins Area !!");
        
SetPlayerPos(playerid,  295.82523, -1797.978034.54306);
        
SendClientMessage(playerid, -1message);
    }
    return 
1;

it should work


Re: teleport cmd with SSCANF. - Yaa - 01.01.2017

PHP код:
COMMAND:admina(playeridparams[])
{
    if(!
adminLevel(playerid3)) return 0;
    new 
message[128]; 
    
changeAlog(playerid"Use /admina command.");   //line 96
    
format(messagesizeof(message), "You have been teleported to Admins Area !!");
    
SetPlayerPos(playerid,  295.82523, -1797.978034.54306);
    
Server(playeridmessage);
    return 
1;

RyderX correct your code -,,,,-


Re: teleport cmd with SSCANF. - aymane123 - 01.01.2017

Nah it still like this:
PHP код:
C:\Documents and Settings\Administrateur\Bureau\CZ\pawno\include\cnr/admin.inc(96) : warning 225unreachable code
C
:\Documents and Settings\Administrateur\Bureau\CZ\pawno\include\cnr/admin.inc(96) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


2 Warnings




Re: teleport cmd with SSCANF. - aymane123 - 01.01.2017

Its works Thx yaa and ryderX.


Re: teleport cmd with SSCANF. - RyderX - 01.01.2017

Quote:
Originally Posted by aymane123
Посмотреть сообщение
Its works Thx yaa and ryderX.
No problem


Re: teleport cmd with SSCANF. - iLearner - 01.01.2017

Quote:
Originally Posted by RyderX
Посмотреть сообщение
PHP код:
COMMAND:admina(playeridparams[])
{
    if(!
adminLevel(playerid3))
    {
    return 
0;
        new 
message[128];  //line 95
        
changeAlog(playerid"Use /admina command.");   //line 96
        
format(messagesizeof(message), "You have been teleported to Admins Area !!");
        
SetPlayerPos(playerid,  295.82523, -1797.978034.54306);
        
SendClientMessage(playerid, -1message);
    }
    return 
1;

it should work


@OP Use Yaa's.

Edit: late