GetPlayerVirtualWorld - Quick, easy help
#1

GetPlayerVirtualWorld

Ok, this is a simple question, i want to create a command.

/teles

i would like people in virtual world 5 to only use it. how can i do that by using 'Getplayervirtualworld?

Thanks

pawn Код:
if(strcmp(cmdtext, "/teles", true) == 0)
    {
        SendClientMessage(playerid, COLOR_ORANGE, "** ONLY USE THESE IF YOU ARE IN THE STUNT WORLD. ");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntshowplayers ");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntplane ** /nrgcourse1 ** /stuntls ** /floodedpark ** /sewerstuntzone");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntchilliad ** /stuntaa ** /aamj ** /obcourse1 ** /moviestage ** /effeltower");
        SendClientMessage(playerid, COLOR_ORANGE, "** /aquastunts ** /moviecasino ** /moviefactory **");

    }
Reply
#2

Код:
if(strcmp(cmdtext, "/teles", true) == 0)
    {
        if( Getplayervirtualworld == 5 )
        {
        SendClientMessage(playerid, COLOR_ORANGE, "** ONLY USE THESE IF YOU ARE IN THE STUNT WORLD. ");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntshowplayers ");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntplane ** /nrgcourse1 ** /stuntls ** /floodedpark ** /sewerstuntzone");
        SendClientMessage(playerid, COLOR_ORANGE, "** /stuntchilliad ** /stuntaa ** /aamj ** /obcourse1 ** /moviestage ** /effeltower");
        SendClientMessage(playerid, COLOR_ORANGE, "** /aquastunts ** /moviecasino ** /moviefactory **");
}

    }
Reply
#3

A little modification to the above code.
pawn Код:
if(strcmp(cmdtext, "/teles", true) == 0)
{
    if ( GetPlayerVirtualWorld( playerid ) == 5 )
    {
        // this will get called only if playerid is in virtual world 5
    }
}
Reply
#4

Quote:
Originally Posted by [NoV]LaZ
Посмотреть сообщение
A little modification to the above code.
pawn Код:
if(strcmp(cmdtext, "/teles", true) == 0)
{
    if ( GetPlayerVirtualWorld( playerid ) == 5 )
    {
        // this will get called only if playerid is in virtual world 5
    }
}
lol what a noob mistake of mine. Laz got the right answer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)