27.09.2015, 18:44
Use o plugin streamer
Exemplo:
PHP код:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD);
PHP код:
new CP[2];
CP[0] = CreateDynamicCP(285.9076,-32.2660,1001.5156, 1.0);
CP[1] = CreateDynamicCP(1335.4783,-1271.9274,13.5469, 2.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк entrou no checkpoint 1");
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(CP[0] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 0");
}
if(CP[1] == checkpointid)
{
SendClientMessage(playerid, -1, "Vocк saiu do checkpoint 1");
}
return 1;
}