Car Chat - Need help
#7

I post it for you if you don't want to search ^^
pawn Код:
if(strcmp(cmd,"/cw",true)==0)
    {
    if(IsSpawned[playerid] == 0) {
    SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
    return 1;
    }
    if(!IsPlayerInAnyVehicle(playerid)) {
    SendClientMessage(playerid, COLOR_ERROR, "You not in any vehicle. You cannot use this command");
    return 1;
    }
   
    if(strlen(cmdtext) <= 4) {
    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /cw (msg)");
    return 1;
    }
    new cwhisperid = GetPlayerVehicleID(playerid);
    new output[150];
    new pname[24];
    GetPlayerName(playerid, pname, 24);
    strmid(output,cmdtext,3,strlen(cmdtext));
    format(string, sizeof(string), "(CAR WHISPER): %s(%d) %s",pname,playerid,output);
    printf("%s", string);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerInAnyVehicle(i))
    {
    if(GetPlayerVehicleID(i) == cwhisperid)
    {
    format(string, sizeof(string), "(CAR WHISPER): %s(%d) %s",pname,playerid,output);
    SendClientMessage(i,COLOR_YELLOW,string);
    }
    }
    }
    return 1;
    }
Reply


Messages In This Thread
Car Chat - Need help - by HammerSmith - 16.06.2011, 18:06
AW: Car Chat - Need help - by xerox8521 - 16.06.2011, 18:18
Re: Car Chat - Need help - by Wesley221 - 16.06.2011, 18:26
Re: Car Chat - Need help - by CoaPsyFactor - 16.06.2011, 18:31
Re: Car Chat - Need help - by HammerSmith - 16.06.2011, 18:36
AW: Car Chat - Need help - by xerox8521 - 16.06.2011, 18:40
Re : Car Chat - Need help - by Shidony - 16.06.2011, 18:47
Re: AW: Car Chat - Need help - by HammerSmith - 16.06.2011, 18:50
Re : Car Chat - Need help - by Shidony - 16.06.2011, 18:55
AW: Re: AW: Car Chat - Need help - by xerox8521 - 16.06.2011, 19:01

Forum Jump:


Users browsing this thread: 1 Guest(s)