01.11.2012, 19:58
pawn Код:
new StuntWorld, DriftWorld, DriftWorldID = 1, StuntWorldID = 2;
pawn Код:
enum pInfo
{
AdminLevel,
VipLevel,
cash,
score,
currentcar,
CheckPointID,
bool:IsFreeRoaming,
Speed,
Muted,
Banned,
BonnetOpen,
SpecialNos,
Warns,
GoesInVehicle,
TickCount,
SpeedTest,
Lights,
Engine,
BootOpen,
Ip[16],
Float:SFloatX,
Float:SFloatY,
Float:SFloatZ,
Float:airbrkxcoord,
Float:airbrkycoord,
Float:airbrkzcoord,
World
}
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
stock SetWorld(playerid, world[])
{
if(!strcmp(world, "DriftWorld", true)) //Kijken of de naam klopt
{
PlayerInfo[playerid][World] = DriftWorld;
SetPlayerVirtualWorld(playerid, DriftWorldID);
SendClientMessage(playerid, COLOR_WHITE, "SetWorld = DriftWorld");
}
else if(!strcmp(world, "StuntWorld", true))
{
PlayerInfo[playerid][World] = StuntWorld;
SetPlayerVirtualWorld(playerid, StuntWorldID);
SendClientMessage(playerid, COLOR_WHITE, "SetWorld = StuntWorld");
}
return 1;
}
pawn Код:
// the dialog it shows at requestclass
if(dialogid == DIALOG_WORLDS)
{
switch(listitem)
{
case 0:
{
PlayerInfo[playerid][World] = DriftWorld;
SendClientMessage(playerid, COLOR_WHITE, "Picked DriftWorld");
}
case 1:
{
PlayerInfo[playerid][World] = StuntWorld;
SendClientMessage(playerid, COLOR_WHITE, "Picked StuntWorld");
}
}
}