#include a_samp#include zcmd#include sscanf2CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;}public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;}
public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;}
Adok egy jobbat!http://sampforum.hu/index.php?topic=21712.0
#include a_samp#include zcmd#include sscanf2CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;}public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;} Nem teszteltem! [/quote] n(15) : error 017: undefined symbol \"skinid\" Dupla hozzászólás automatikusan összefûzve. ( 2012. június 16. - 11:51:36 ) public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;} Ez nem kell bele. [/quote]Így pedig halál után nem marad meg a skin. :S:S
n(15) : error 017: undefined symbol \"skinid\"
public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;} Ez nem kell bele. [/quote]Így pedig halál után nem marad meg a skin. :S:S
próbáld meg hogy az onplayerdeath alá oda írod hogy new skinid;
g:\\SAMP Windows Server\\WARMODE\\TLG WARMOD\\Alap mode\\sskin\\sskin.pwn(14) : error 003: declaration of a local variable must appear in a compound blockg:\\SAMP Windows Server\\WARMODE\\TLG WARMOD\\Alap mode\\sskin\\sskin.pwn(14) : error 010: invalid function or declarationg:\\SAMP Windows Server\\WARMODE\\TLG WARMOD\\Alap mode\\sskin\\sskin.pwn(17) : error 010: invalid function or declarationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 3 Errors.
#include a_samp#include zcmd#include sscanf2new skinid; CMD:skin(playerid,params[]){if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;}public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(GetPlayerSkin(playerid),skinid);return 1;}
#include <a_samp>#include <zcmd>#include <sscanf2>CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);SetPVarInt(playerid, \"Skin\", skinid);return 1;}public OnPlayerDeath(playerid, killerid, reason){SetPlayerSkin(playerid, GetPVarInt(playerid, \"Skin\"));return 1;}
new skinid[MAX_PLAYERS];//MÓD ELEJE!!!!!!!!!!!!!!!!!!!!stock sSetPlayerSkin(playerid,skinid){SetPlayerSkin(playerid,skinid);skinid[playerid] = skinid;return 1;}#define SetPlayerSkin sSetPlayerSkin//-----------------------------------------public OnPlayerSpawn(playerid){SetPlayerSkin(playerid,skinid[playerid]);return 1;}CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;}
#include a_samp#include zcmd#include sscanfnew skin[MAX_PLAYERS];CMD:skin(playerid,params[]){if(sscanf(params,\"d\",skin[playerid])) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid(0-299)]\");if(skin[playerid] < 0 || skin[playerid] > 299) return SendClientMessage(playerid,-1,\"Csak 0 és 299 közötti id-vel rendelkezõ skinek vannak!\");SetPlayerSkin(playerid,skin[playerid]);return 1;}public OnPlayerSpawn(playerid) return SetPlayerSkin(playerid, skin[playerid]);
g:\\SAMP Windows Server\\WARMODE\\TLG WARMOD\\Alap mode\\skin.pwn(3) : fatal error 100: cannot read from file: \"sscanf\"Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error.
new skinid[MAX_PLAYERS];//MÓD ELEJE!!!!!!!!!!!!!!!!!!!!stock sSetPlayerSkin(playerid,skinid){SetPlayerSkin(playerid,skinid);skinid[playerid] = skinid;return 1;} #define SetPlayerSkin sSetPlayerSkin//-----------------------------------------public OnPlayerSpawn(playerid){SetPlayerSkin(playerid,skinid[playerid]);return 1;}CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;} A halálnál válthatjátok a skint úgy is eltûnik xDItt ez amikor használod a SetPlayerSkin-t, akkor menti egybõl, és spawnnál mindig azt hozza be [/quote]Ezt áttudnád írni ilylen fajtává? if (strcmp(cmdtext, \"/respawn\", true) == 0) { SpawnPlayer(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Respawnoltál! {ffffff}Rövidebb parancs: {00c0ff}/res{ffffff}!\"); SetPlayerHealth(playerid, 100); return 1; }
new skinid[MAX_PLAYERS];//MÓD ELEJE!!!!!!!!!!!!!!!!!!!!stock sSetPlayerSkin(playerid,skinid){SetPlayerSkin(playerid,skinid);skinid[playerid] = skinid;return 1;} #define SetPlayerSkin sSetPlayerSkin//-----------------------------------------public OnPlayerSpawn(playerid){SetPlayerSkin(playerid,skinid[playerid]);return 1;}CMD:skin(playerid,params[]){new skinid;if(sscanf(params,\"d\",skinid)) return SendClientMessage(playerid,-1,\"Használat : /skin [skinid]\");if(skinid < 0 || skinid > 299) return SendClientMessage(playerid,-1,\"Csak 1-tõl és 299 közt vannak a skinek!\");SetPlayerSkin(playerid,skinid);return 1;}
if (strcmp(cmdtext, \"/respawn\", true) == 0) { SpawnPlayer(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Respawnoltál! {ffffff}Rövidebb parancs: {00c0ff}/res{ffffff}!\"); SetPlayerHealth(playerid, 100); return 1; }
#include < a_samp >#include < zcmd >#include < sscanf2 > CMD:skin( playerid, params[] ){ newiSkinID,szFormat[ 50 ];if( sscanf( params, \"i\", iSkinID ) ) return SendClientMessage( playerid, 0xFF0000AA, \"Használat: /skin < Skin ID >\" );if( iSkinID < 0 || iSkinID > 299 ) return SendClientMessage( playerid, 0xFF0000AA, \"HIBA: A Skin ID, csak 0 és 299 között lehet.\" );SetPlayerSkin( playerid, iSkinID );format( szFormat, sizeof( szFormat ), \"Átállítottad a skinedet. ID: %d\", iSkinID );SendClientMessage( playerid, -1, szFormat );return 1;}