12.04.2019, 22:18
Use como base:
PHP Code:
new L_CheckPoint01[MAX_PLAYERS]; // CheckPoint carregar 1;
new UL_CheckPoint01[MAX_PLAYERS]; // Checkpoint descarregar 1;
cmd:work(playerid)
{
L_CheckPoint01[playerid] = CreateDynamicCP(-1005.3510,-676.9293,32.0078, 10.0, -1, -1, playerid, STREAMER_CP_SD, -1, 0);
SetPlayerMapIcon(playerid, 0, -1005.3510,-676.9293,32.0078, 0, 0xFF0000FF, MAPICON_GLOBAL);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == L_CheckPoint01[playerid])
{
SendClientMessage(playerid, -1, "[WORK] Carga carregada, agora vб descarregar.");
DestroyDynamicCP(L_CheckPoint01[playerid]);
RemovePlayerMapIcon(playerid, 0);
L_CheckPoint01[playerid] = 0;
UL_CheckPoint01[playerid] = CreateDynamicCP(-1046.0258,-655.5824,32.0078, 10.0, -1, -1, playerid, STREAMER_CP_SD, -1, 0);
SetPlayerMapIcon(playerid, 0, -1046.0258,-655.5824,32.0078, 0, 0xFF0000FF, MAPICON_GLOBAL);
return 1;
}
if(checkpointid == UL_CheckPoint01[playerid])
{
SendClientMessage(playerid, -1, "[WORK] Carga descarregada com sucesso, bom trabalho.");
DestroyDynamicCP(UL_CheckPoint01[playerid]);
RemovePlayerMapIcon(playerid, 0);
UL_CheckPoint01[playerid] = 0;
return 1;
}
return 1;
}