28.07.2012, 21:26
Forgot to tell it should be a global in this case, i did a little mistake. it should work now.
pawn Code:
new time2[MAX_PLAYERS];
cmd(world, playerid, params[])
{
new
mvID
;
if(time2[playerid] > gettime()) return SendClientMessage(playerid,-1,"You must wait 3 minutes to use it again");
if ( sscanf( params, "d", mvID ) ) return SendClientMessage( playerid, -1, "* usage /world id" );
if ( mvID < 0 || mvID > 99 ) return SendClientMessage( playerid, -1, "* world id 0 - 99" );
SetPlayerVirtualWorld( playerid, mvID );
for ( new i = 0; i < 6; i++ ) SendClientMessage( playerid, -1, " " ); // for what are u using that?
format( string, sizeof ( string ), "* You are now in the virtual world %d", mvID );
SendClientMessage( playerid, -1, string );
time2[playerid] = gettime() + 5;
return 1;
}