27.12.2014, 18:13
Falar galera , achei um code , e queria encaixar no meu gm.
assim...
Coloquei isso no topo.
Isso coloquei em public OnPlayerCommandText(playerid,cmdtext[])
isso em public OnPlayerEnterCheckpoint(playerid)
Mais quando coloco pra compilar. o pawn para de funcionar. me ajudem ae, vlw
assim...
Coloquei isso no topo.
PHP код:
new Stats[MAX_PLAYERS];
new Float:Checkpoints[4][3] = //4 = 4 coordenadas | 3 = 3 "valores" (X,Y,Z)
{
{3116.8188,-2054.5698,3.5096},
{3125.7852,-1768.5270,3.5096},
{3345.8813,-1770.8011,5.4053},
{3477.7815,-1811.6428,3.4826}
};
PHP код:
if(strcmp(cmdtext, "/plixo", true) == 0)
{
if(PlayerInfo[playerid][pProfissao] == Sequestrador){
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
SetPlayerRaceCheckpoint(i, 0, Checkpoints[1][1], Checkpoints[1][2], Checkpoints[1][3], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], 10);
Stats[i] = 1;
return 1;
}
}
}else{
SendClientMessage(playerid, COLOR_RED, "Apenas Para Admins");
}
}
PHP код:
switch(Stats[playerid])
{
case 1:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[2][1], Checkpoints[2][2], Checkpoints[2][3], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], 10);
Stats[i] = 2;
return 1;
}
case 2:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[3][1], Checkpoints[3][2], Checkpoints[3][3], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], 10);
Stats[i] = 3;
return 1;
}
case 3:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 1, Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][3]-5, 10);
Stats[i] = 4;
return 1;
}
case 4:
{
DisablePlayerRaceCheckpoint(playerid);
GameTextForPlayer(playerid, "You have won the race!!", 3000, 1);
GivePlayerMoney(playerid, 10000);
return 1;
}
}
}

