22.01.2011, 17:16
Everything looks like this:
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/arm", cmdtext, true, 10) == 0) { PutRiotShieldOnArm(playerid); return 1; } if (strcmp("/back", cmdtext, true, 10) == 0) { PutRiotShieldOnBack(playerid); return 1; } if (strcmp("/light", cmdtext, true, 10) == 0) { GiveFlashLight(playerid); return 1; } if (strcmp("/tazer", cmdtext, true, 10) == 0) { GiveTazer(playerid); return 1; } if (strcmp("/removeitems", cmdtext, true, 10) == 0) { RemoveItems(playerid); return 1; } return 0; } if(!strcmp(cmdtext, "/ita", true,4)) { if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,0x7DB34DFF,"* Si komanda tik policininkams"); return 1;} new vardas[MAX_PLAYER_NAME],itarimas[256]; strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME); itarimas = GetArgument(2, cmdtext,1); if(!strcmp(vardas, "0", true) || !strcmp(itarimas, "0", true)){SendClientMessage(playerid, 0x0000A890, "* Itarti zaideja: /ita [nick] [itarimas]"); return 1;} new id = GetPlayeridMid(vardas); if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0x7DB34DFF, "* Tokio vardo nera"); return 1;} if (id == playerid){ SendClientMessage(playerid, 0x7DB34DFF, "* Saves itarti negali"); return 1;} new Float:Coo[3]; GetPlayerPos(id,Coo[0],Coo[1],Coo[2]); if(!PlayerToPoint(100, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, 0x7DB34DFF, "* Zaidejas per toli, kaip tu gali pamatyti ka jis daro?"); return 1;} new msg[128],police[MAX_PLAYER_NAME],itar[MAX_PLAYER_NAME]; GetPlayerName(playerid,police,sizeof(police)); GetPlayerName(id,itar,sizeof(itar)); SetPlayerWantedLevel(id,GetPlayerWantedLevel(id)+1 ); format(msg,sizeof(msg),"[racija] %s: pastebejau, kaip %s %s!",police,itar,itarimas); SendMessageToCops(0x7DB34DFF,msg); return 1; } |