24.05.2009, 14:40
Quote:
Originally Posted by Klutty
pawn Код:
|
warning 213: tag mismatch
warning 202: number of arguments does not match definition
Here is my script, look through it.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid,0.0); return 1; } if(!strcmp(cmdtext, "/ooc", true, 3)) { new str[256], pname[256]; GetPlayerName(playerid, pname, 256); format(str, 256, "(( Ooc: %s:%s ))", pname, cmdtext[4]); SendClientMessageToAll(0xFFFFFFAA, str); return 1; } if(!strcmp(cmdtext, "/b", true, 10) == 0) { for(new i = 0; i < MAX_PLAYERS; i++) { if(GetDistanceBetweenPlayers(playerid) <= 20) { if(cmdtext[2] == 32 || cmdtext[3] != EOS) { new str[128]; format(str, 128, "%s: %s", Name(playerid), cmdtext[3]); SendClientMessage(playerid, 0xFFFFFFAA, str); } } } } return true; } public OnPlayerInfoChange(playerid) { return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } Name(playerid) { new n[24]; GetPlayerName(playerid, n, 24); return n; } stock GetDistanceBetweenPlayers(playerid, playerid2) { new Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2; new Float:tmpdis; GetPlayerPos(playerid, x1, y1, z1); GetPlayerPos(playerid2, x2, y2, z2); tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2) + floatpower(floatabs(floatsub(y2, y1)), 2) + floatpower(floatabs(floatsub(z2, z1)), 2)); return floatround(tmpdis); }