24.08.2012, 21:46
Eu tenho um tapete de prego aqui, e quero deixa apenas para policias.
Olhem o meu "TEAM":
E o meu [FS] do tapete:
Quem puder me ajudar agradeзo.
Olhem o meu "TEAM":
Код:
#define TEAM_COP 1 #define TEAM_ARMY 2 #define TEAM_MEDIC 3 #define TEAM_CARFIX 4 #define TEAM_CIA 5 #define TEAM_DRIVER 6 #define TEAM_BISTRO 7 #define TEAM_JAILTK 8 #define TEAM_PVTMED 9 #define TEAM_CIVIL 10 #define TEAM_GASDEL 11 #define TEAM_DRGDEL 12 #define TEAM_HITMAN 13 #define TEAM_GUNDEL 14 #define TEAM_SNITCH 15 #define TEAM_RAPIST 16 #define TEAM_BOUNTY 17 #define TEAM_KIDNAP 18 #define TEAM_DJUNKIE 19 #define TEAM_THIEF 20 #define TEAM_PIMP 21 #define TEAM_PILOT 22 #define TEAM_SMUG 23 #define TEAM_TERRO 24 #define TEAM_CARJACK 25 #define TEAM_FIRE 26 #define TEAM_EGG 27
Код:
#include <a_samp>
#include <SpikeStrip>
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd,"/ctapete",true) == 0)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}
else if (strcmp(cmd,"/rtapete",true) == 0)
{
DeleteClosestStrip(playerid);
return 1;
}
else if (strcmp(cmd,"/removerall",true) == 0)
{
DeleteAllStrip();
return 1;
}
return 0;
}


abrass