14.02.2010, 10:24
Please try to remake my command from the code i gave you.
pawn Код:
//At Top
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//The Command
dcmd_p(playerid,params[])
{
new vehicleid;
if(strlen(params) == 0) return SendClientMessage(playerid, red, "Usage: /p (Text)");
for (new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i) || !IsPlayerInAnyVehicle(i)) continue;
vehicleid = GetPlayerVehicleID(i);
switch(GetVehicleModel(vehicleid))
{
case 417 ,425, 447, 592, 577, 511, 512,
593, 520, 553, 476, 519, 460, 513, 548,
487, 488, 497, 563, 469:
{
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string,sizeof(string),"Pilot Chat: %s: %s",pName, params);
SendClientMessage(i, green, string);
}
}
return 1;
}
return 1;
}
//At OnPlayerCommandText
dcmd(p,1,cmdtext);