[COMPILE ERROR] Prox Detector
#3

pawn Код:
stock strreplace(string[], find, replace)
{
    new len = strlen(string);
    while(len--)
    {
        if(string[len] == find) string[len] = replace;
    }
     return string;
}
And

pawn Код:
CMD:setfaction(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] <= 5) return SendClientMessage(playerid, COLOR_RED, " ** You need to be a level 5 admin to do that!");
   
    new otherplayerid;
    new faction;
    new pName[MAX_PLAYER_NAME], gName[MAX_PLAYER_NAME];
    if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_RED, " ** They are not online!");
    if(sscanf(params, "u", otherplayerid, faction)) return SendClientMessage(playerid, COLOR_RED, "Use /setfaction [playerid/name] [faction number 1 - 11]");
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    GetPlayerName(otherplayerid, gName, MAX_PLAYER_NAME);
    SendClientMessage(otherplayerid, COLOR_GREEN, " ** Admin %s has set your faction to %s",pName,faction);
    SendClientMessage(playerid, COLOR_GREEN, " ** You have set player %s faction to %s",gName,faction);
    PlayerInfo[otherplayerid][gTeam] = faction;  
    return 1;
}
Reply


Messages In This Thread
[COMPILE ERROR] Prox Detector - by NewerthRoleplay - 01.05.2012, 19:22
Re: [COMPILE ERROR] Prox Detector - by Passout - 01.05.2012, 19:25
Re: [COMPILE ERROR] Prox Detector - by pyrodave - 01.05.2012, 19:30
Re: [COMPILE ERROR] Prox Detector - by Biesmen - 02.05.2012, 07:13

Forum Jump:


Users browsing this thread: 1 Guest(s)