All pastes #579986 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-20 22:29 UTC
rendered paste body
Top of the script:

new object[MAX_PLAYERS];

OnPlayerConnect: 	

object[playerid] = -1;

OnPlayerCommandText:

if (strcmp(cmdtext, "/shark", true) == 0)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	object[playerid] = CreateObject(1608, x, y, z, 0.0, 0.0, 0.0);
	AttachObjectToPlayer(object[playerid], playerid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
	return 1;
}
if (strcmp(cmdtext, "/removeshark", true) == 0)
{
    if(object[playerid] == -1)
    {
        SendClientMessage(playerid, 0xAA3333AA, "You do not have a shark :O");
        return 1;
    }
    DestroyObject(object[playerid]);
    object[playerid] = -1;
    return 1;
}