Koszi, de nem akarok sscanf es zcmd-t hasznalni. Szoval ilyen regi modiasan szeretnem megoldani.
Az viszont erdekelne hogyan lehet megcsinalni hogy az rcon admin lassa a pmet.??
pm bol is a gyarit hasznalom!
Elore is koszonom!
Megcsinaltam igy csak ezzel az a gond hogy aki a 0 es 1 csapatba van es beirja /spec kiirja hogy \"HIBA\" es azok a parancsok amik a spec utan vannak nem mukodnek mindegyikre \"HIBA\"t ir. De ami a spec elott van az mukodik.
if(gTeam[playerid] != 0) return SendClientMessage(playerid, COLOR_WHITE, \"HIBA\");
{
if(gTeam[playerid] != 1) return SendClientMessage(playerid, COLOR_WHITE, \"HIBA\");
{
if(strcmp(cmdspec, \"/spec\", true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idxspec);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, \"USAGE: /spec [playerid]\");
return 1;
}
specplayerid = strval(tmp);
if(specplayerid == playerid) return SendClientMessage(playerid, COLOR_RED, \"ERROR: You cannot spectate yourself\");
if(GetPlayerState(specplayerid) != 1 && GetPlayerState(specplayerid) != 2 && GetPlayerState(specplayerid) != 3) return SendClientMessage(playerid, COLOR_RED, \"Spectate: Player not spawned\");
if(!IsPlayerConnected(specplayerid)) {
SendClientMessage(playerid, COLOR_RED, \"specplayer: that player isn\'t active.\");
return 1;
}
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, specplayerid);
SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
gSpectateID[playerid] = specplayerid;
gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
return 1;
}
}
}