Attiecīgajam spēlētājam attiecīga komanda
Posted: 17 Jun 2008, 02:22
Kā panākt ka tikai izredzētais var (piemēram) aktivizēt kaut kādu komandu un citi nevar? Tas pats ar klanu...
Code: Select all
new Nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nick, sizeof(Nick));
if(strfind(Nick, "_AmP", true) != -1) {
Code: Select all
if(strcmp("/vortex", cmdtext, true, 6) == 0)
{
if(mainigais == 0) {
SendClientMessage(playerid, 0x33AA33AA,"VorteX bazes varti atveras");
MoveObject(vortex, 1458.403320, 1663.864258, 21.963526, 5); //vala
mainigais = 1;
} else if(mainigais == 1) {
SendClientMessage(playerid, 0xAA3333AA,"VorteX bazes varti aizveras");
MoveObject(vortex, 1458.403320, 1663.864258, 12.963526, 5); //ciet
mainigais = 0;
}
return 1;
}
Code: Select all
if(strcmp("/vortex", cmdtext, true, 6) == 0)
{
new Nick[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nick, sizeof(Nick));
if(strfind(Nick, "_AmP", true) != -1 || strfind(Nick, "[VorteX]", true) != -1) {
if(mainigais == 0) {
SendClientMessage(playerid, 0x33AA33AA,"VorteX bazes varti atveras");
MoveObject(vortex, 1458.403320, 1663.864258, 21.963526, 5); //vala
mainigais = 1;
} else if(mainigais == 1) {
SendClientMessage(playerid, 0xAA3333AA,"VorteX bazes varti aizveras");
MoveObject(vortex, 1458.403320, 1663.864258, 12.963526, 5); //ciet
mainigais = 0;
}
}
return 1;
}