26.03.2014, 10:28
Quote:
CMD: plate( playerid, params[] ) { if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5 || (PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pDivision] == 2)) return SendClientMessage( playerid, -1, "SERVER: You're not faction LEO."); new szPlate[32], iVictim, ivVictim;//iVictim = id Player yang mau diubah platenya, ivVictim = id dynamic mobil player yang mau diubah plate if( sscanf( params, "uds[32]", iVictim, ivVictim, szPlate ) || strlen( szPlate ) > 10) return SendClientMessage( playerid, -1, "Server: /plate [playerid] [vehID] [plate(1-10 letters)]" ); else if( !IsPlayerConnected( iVictim ) ) return SendClientMessage( playerid, -1, "Error: That player isn't connected." );*/ /*else if( !IsPlayerInAnyVehicle( iVictim ) ) return SendClientMessage( playerid, -1, "Error: That player isn't in a vehicle." );*/ /*else { new pvid = -1; for( new d = 0 ; d < MAX_PLAYERVEHICLES; d++) { if(PlayerVehicleInfo[iVictim][d][pvId] != INVALID_PLAYER_VEHICLE_ID) { if(PlayerVehicleInfo[iVictim][d][pvId] == ivVictim) { pvid = d; break; } } } if(pvid == -1) return SendClientMessageEx(playerid,COLOR_GREY,"Veh's ID doesn't belong to player's ID"); else { new szString[128] ; //format( v_Plate[ivVictim], 32, "%s", szPlate ); SetVehicleNumberPlate( ivVictim, szPlate ); SetVehicleToRespawn( ivVictim ); format(PlayerVehicleInfo[iVictim][pvid][pvNumberPlate], 32, "%s", szPlate); format( szString, 128, "You've set %s's vehicle plate to %s.",GetPlayerNameEx(iVictim), szPlate ); SendClientMessage( playerid, -1, szString ); format( szString, 128, "Police/LEO set your vehicle plate to %s.", szPlate ); SendClientMessage( iVictim, -1, szString ); } } return 1; |
and why civilians can? please help me fix this bug.
*sorry for bad my english.