PHP код:
new killtimerr;
new PlayerText:TDEditor_PTD1[MAX_PLAYERS][2];
forward speed(playerid);
public speed(playerid)
{
new name[128];
format(name,sizeof(name),"%i",GetSpeed(playerid));
PlayerTextDrawSetString(playerid,TDEditor_PTD1[playerid][1],name);
PlayerTextDrawShow(playerid,TDEditor_PTD1[playerid][0]);
PlayerTextDrawShow(playerid,TDEditor_PTD1[playerid][1]);
return 1;
}
public OnPlayerConnect(playerid)
{
// speed
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 552.000000, 338.312500, "speed:");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 3);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 565.000000, 338.312500, "x");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
// intra in masina
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
killtimerr = SetTimerEx("speed", 100, true, "i", playerid);
}
// IESE DIN MASINA GATA SPEEDU
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
KillTimer(killtimerr);
TextDrawHideForPlayer(TDEditor_PTD1[playerid][0]);
TextDrawHideForPlayer(TDEditor_PTD1[playerid][1]);
}
return 1;
}
Current directory: D:\Server de samp\gamemodes
mama.pwn(302) : warning 213: tag mismatch
mama.pwn(302) : warning 202: number of arguments does not match definition
mama.pwn(303) : warning 213: tag mismatch
mama.pwn(303) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
================ READY ================