14.11.2013, 14:09
(
Последний раз редактировалось newbie scripter; 14.11.2013 в 15:12.
)
pawn Код:
CMD:pchat (playerid, params [])
{
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleID(playerid) == 417 || 425 || 447 || 460 || 469 || 476 || 487 ||488 || 489 || 511 || 512 || 513 ||519 || 520 || 548 || 553 || 563 || 577 || 592 || 593)
{
if (isnull (params)) return SendClientMessage(playerid, -1, "Usage: /pchat [msg]");
else
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if( GetPlayerVehicleID(i) == 417 || 425 || 447 || 460 || 469 || 476 || 487 ||488 || 489 || 511 || 512 || 513 ||519 || 520 || 548 || 553 || 563 || 577 || 592 || 593)
{
format(msg, sizeof(msg), "Pilot %s : %s", name, params)
SendClientMessage(i, -1, msg);
}
}
}
}
else {SendClientMessage(playerid, -1 , "You Need to be in a air vehicle to use Pilot's chat"); }
return 1;
}
Im using ZCMD here.
Add this script anywhere and not inside any callback and place the script below main()