teleport cmd with SSCANF.
#1

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.
Reply
#2

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
Reply
#3

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 -,,,,-
Reply
#4

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

Reply
#5

Its works Thx yaa and ryderX.
Reply
#6

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)