02.03.2012, 20:15
Hello,
I've created a Setvip command for my upcoming lVIP-System.
but whenever i enter the command such as "/setvip myself 3" it says "iKing Has Given 's VIP Level ." Instead of his name and VIP level i gave him,
here's the command.
Thanks!
I've created a Setvip command for my upcoming lVIP-System.
but whenever i enter the command such as "/setvip myself 3" it says "iKing Has Given 's VIP Level ." Instead of his name and VIP level i gave him,
here's the command.
pawn Код:
CMD :setvip ( playerid , params [ ] )
{
if ( IsPlayerConnected ( playerid ) )
{
if ( IsPlayerAdmin ( playerid ) )
{
new
name [ MAX_PLAYER_NAME ] ,
str [ 79 ] ,
pid ,
level
;
if ( sscanf ( params, "ui" , pid , level ) ) return SendClientMessage ( playerid , 0xBEBEBEAA , "[CORRECTION]: /setvip [playerid] [level 0 - 3]" ) ;
if ( level <= 0 && level >= 3 ) return SendClientMessage ( playerid , 0x8B1A1AAA , "[ERROR]: Level Must Be Between 0-3!" ) ;
if ( level >= 0 && level < 4)
{
pVip [ pid ] = level ;
GetPlayerName ( playerid , name , sizeof ( name ) ) ;
GetPlayerName ( pid , name , sizeof ( name ) ) ;
format ( str , sizeof ( str ) , "*You Have Successfuly Set %s's VIP Level To %s." , pid , level ) ;
SendClientMessage ( playerid , 0x00FF00AA , str ) ;
format ( str , sizeof ( str ) , "*%s Has Setted Your VIP Level To %s" , name , level ) ;
SendClientMessage ( playerid , 0x00FF00AA , str ) ;
}
}
else
SendClientMessage ( playerid, 0x8B1A1AAA , "[ERROR] Only RCON Administrators Can Use This Command!" ) ;
}
else
SendClientMessage ( playerid , 0x8B1A1AAA , "[ERROR] Player Not Connected!" ) ;
return 1;
}