Can I make this type of Command?
#1

I want to make that Commad that If Player in Virtual World then it shows to me if I do like that:

/elist

And it should show me the list of that player who are in Events.

And Also I want to make that Command, If I do /ecars <carname/carid> then Cars automatically should be given to those Players who are in Virtual World except me(who type the cmd).

Is It possible? If "Yes" please...Help...
Reply
#2

Can you give me the Whole Event Code ?
Reply
#3

Just give me that Command, I am not going to give you my script lol.
Reply
#4

Bump
Reply
#5

How are we suppose to know the variables you're using without showing us your event code? We don't know the variable for if the player is at an event, do we? We can't help you unless you tell us this stuff, so as the person said above, give us your event code.
Reply
#6

That is my One of the Command of Event.

pawn Код:
CMD:efreezeall(playerid,params[])
{
    if(pInfo[playerid][pWSELevel]> 1 ) return 0;
    if( GetPlayerVirtualWorld( playerid ) != 1 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] You can't use Event Commands in Real World !" );
    for(new i; i<MAX_PLAYERS; i++)
    TogglePlayerControllable(i,0);
    new p_Name[24],str[128];
    GetPlayerName(playerid,p_Name,24);
    format(str,sizeof(str),"[ ! ](EVENT) Players frozen !",p_Name,playerid);
    SendClientMessageToAll(COLOR_LIGHTGREEN,str);
    return 1;
}
Reply
#7

As DanishHaq said...

That's why we need your Whole Event Code.
Reply
#8

I've post All the Commands? :O
Reply
#9

What should I post?? my Event Commands or what?
Reply
#10

Here is /elist
PHP код:
CMD:elist(playerid) {
    new 
bigString512 ] = "{FFFFFF}Players in Event:",
        
plNameMAX_PLAYER_NAME ],
        
pl = -1,
        
plCount 0
    
;
    
    while ( ++
pl != MAX_PLAYERS ) {
        if ( !
IsPlayerConnected(pl) || GetPlayerVirtualWorldpl ) != ) continue;
        
GetPlayerNameplplNamesizeof plName );
        
formatbigStringsizeof bigString"%s\n%i)\t%24s\t(ID: %i)"bigString, ++plCountplNamepl );
    }
    if ( !
plCount strcatbigString"There is no players in the Event" );
    return 
ShowPlayerDialogplayerid12340"Players in event"bigString"Close""" );

And /ecars
PHP код:
new playersCarMAX_PLAYERS ] = { 0, ... };
public 
OnPlayerDisconnectplayerid ) {
    if ( 
GetVehicleModelplayersCarplayerid ] ) )
        
DestroyVehicleplayersCarplayerid ] );
    
playersCarplayerid ] = 0;
    return 
true;
}
CMD:ecarsplayeridparams[ ] ) {
    if ( 
sscanfparams"i"params] ) )
        return 
SendClientMessageplayerid, -1"Usage: /ecars <CAR MODEL ID>" );
    new 
Floatpl_Pos];
    
params]    = -1,
    
params]    = GetPlayerVirtualWorldplayerid );
    
    while ( ++
params] != MAX_PLAYERS ) {
        if ( !
IsPlayerConnectedparams] ) || GetPlayerVirtualWorldparams] ) != plVW )
            continue;
        if ( 
GetVehicleModelplayersCarparams] ] ) )
            
DestroyVehicleplayersCarparams] ] );
        
        
GetPlayerPosparams], pl_Pos], pl_Pos], pl_Pos] );
        
SetPlayerPosparams], pl_Pos], pl_Pos], pl_Pos] + 0.5 );
        
GetPlayerFacingAngleparams], pl_Pos] );
        
playersCarparams] ] = CreateVehicleparams], pl_Pos], pl_Pos], pl_Pos] + 0.5pl_Pos], random256 ), random256 ), -);
        
PutPlayerInVehicleparams], playersCarparams] ], );
    }
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)