27.10.2008, 01:14
Quote:
Originally Posted by Wadabak
Usefull snippets topic?
|
pawn Код:
#include <a_samp>
new Hspawn[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
Hspawn[playerid] = 1;
return 0;
}
public OnPlayerSpawn(playerid)
{
if (Hspawn[playerid]==1)
{
if(GetPlayerMoney(playerid) > 100)
{
SetPlayerHealth(playerid, 50.5);
SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
SendClientMessage(playerid,0xDD000096,"You spawned at the Los Santos hospital.");
SendClientMessage(playerid,0xFFFFFF96,"|-----------------------------------|");
SendClientMessage(playerid,0xDD000096,"Your medical bill cost: 100$");
GivePlayerMoney(playerid,-100);
return 1;
}
}
return 1;
}
EDIT: Don't to you love the copy and paste indention